enhance cbrt to work on Complex and to return all cube roots #29

Closed
opened 2025-05-07 01:00:24 +00:00 by glen · 2 comments
Owner

For now, we will make cbrt with return typing strategy free or full (the default) always return all three cube roots (by analogy with sqrt's default behavior of returning Complex as necessary), but under typing strategy conservative on real inputs return just the real cube root.

This is the last function needed to implement polynomialRoot.

For now, we will make `cbrt` with return typing strategy `free` or `full` (the default) always return all three cube roots (by analogy with `sqrt`'s default behavior of returning Complex as necessary), but under typing strategy `conservative` on real inputs return just the real cube root. This is the last function needed to implement polynomialRoot.
Author
Owner

Hmm, since every real number has a unique real cube root, I actually think free and conservative should return that real cube root, while full return all three, whereas on complex input, you just always get all three.

Hmm, since every real number has a unique real cube root, I actually think `free` and `conservative` should return that real cube root, while `full` return all three, whereas on complex input, you just always get all three.
Author
Owner

The "easiest" way to find a complex cube root is to use polar form. That requires atan2, sin, and cos. Or there appears to be a formula that just uses real cube and square roots at https://mathproofs.jrensen.nl/proofs/cube-root-complex-number. That's a much lengthier formula, but won't involve starting a trigonometry category.

The "easiest" way to find a complex cube root is to use polar form. That requires atan2, sin, and cos. Or there appears to be a formula that just uses real cube and square roots at https://mathproofs.jrensen.nl/proofs/cube-root-complex-number. That's a much lengthier formula, but won't involve starting a trigonometry category.
glen closed this issue 2025-12-13 07:34:02 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#30 implement polynomialRoot
StudioInfinity/nanomath
Reference
StudioInfinity/nanomath#29
No description provided.