addaptic

Reference Complex exponentials, logarithms, powers and roots

lzc_raise_n

A complex number raised to a whole power.

long lzc_raise_n( CLZComplex* leftOperand, CLZNumber* rightOperand, CLZComplex* targetNumber = nullptr );

zn for a whole n, which is a CLZNumber, each part correctly rounded. A fraction is refused, kFailed; lzc_power takes any exponent.

Examples

CallAnswerReturns
lzc_raise_n( 2 + 1i, 3 )2 + 11ikNoError
lzc_raise_n( 1 + 1i, −2 )0 − 0.5ikNoError
lzc_raise_n( 1 + 1i, 0.5 )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_power A complex number raised to a complex power, the principal value e^(w ln z).
  • lz_raise_n The left number raised to a whole power, the right.