Reference Complex exponentials, logarithms, powers and roots
lzc_root_n
The principal root of complex order w, z^(1/w).
long lzc_root_n( CLZComplex* leftOperand, CLZComplex* rightOperand, CLZComplex* targetNumber = nullptr );
z1/w, the principal root of complex order w, each part correctly rounded and exact where the mathematics is. On the real axis it answers as the real root does, so an odd root of a negative real is the real root. Order nought is refused, kFailed.
Examples
| Call | Answer | Returns |
|---|---|---|
lzc_root_n( 2 + 11i, 3 + 0i ) | 2 + 1i | kNoError |
lzc_root_n( −8 + 0i, 3 + 0i ) | −2 + 0i | kNoError |
lzc_root_n( 1 + 1i, 0 + 0i ) | not a number | kFailed |
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
lzc_root_2The principal square root of a complex number.lzc_root_3The cube root of a complex number; an odd root of a negative real is the real root.lzc_powerA complex number raised to a complex power, the principal value e^(w ln z).lz_root_nThe root of the left number whose order is the right.