addaptic

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

CallAnswerReturns
lzc_root_n( 2 + 11i, 3 + 0i )2 + 1ikNoError
lzc_root_n( −8 + 0i, 3 + 0i )−2 + 0ikNoError
lzc_root_n( 1 + 1i, 0 + 0i )not a numberkFailed

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_2 The principal square root of a complex number.
  • lzc_root_3 The cube root of a complex number; an odd root of a negative real is the real root.
  • lzc_power A complex number raised to a complex power, the principal value e^(w ln z).
  • lz_root_n The root of the left number whose order is the right.