addaptic

Reference Complex exponentials, logarithms, powers and roots

lzc_root_3

The cube root of a complex number; an odd root of a negative real is the real root.

long lzc_root_3( CLZComplex* leftOperand, CLZComplex* targetNumber = nullptr );

Each part correctly rounded and exact where the mathematics is: the cube root of 2 + 11i is exactly 2 + i. On the real axis it answers as lz_root_3 does, so the cube root of −8 is −2, the real root; elsewhere it is the principal value.

Examples

CallAnswer
lzc_root_3( 2 + 11i )2 + 1i
lzc_root_3( −8 + 0i )−2 + 0i
lzc_root_3( 0 + 8i )1.732050807568877293527446341505872367 + 1i

Each answer is what Addaptic printed for the call, at 36 places unless a setting is shown.

Returns

kNoError (0) when the answer is written. Otherwise an error code, with the answer flagged infinite or not-a-number; see Errors and flags.

See also