Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

Support negative roots #35

@evykassirer

Description

@evykassirer

Even roots of negative numbers should isolate the root(-1) and then take the root of the rest of it (which it can already do, since it'll be positive)

The current nthroot code doesn't support negative radicands e.g. sqrt(-4), which could be simplified to 2 * sqrt(-1) or even eventually 2*i

Some things I've thought about so far:

  • Note that odd roots of negative numbers are actually valid - e.g. the cube root of -1 is -1, and the cube root of -8 is -2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions