Reference Complex exponentials, logarithms, powers and roots
lzc_power
A complex number raised to a complex power, the principal value e^(w ln z).
long lzc_power( CLZComplex* leftOperand, CLZComplex* rightOperand, CLZComplex* targetNumber = nullptr );
ew ln z, the principal value, with w complex; each part correctly rounded and exact where the mathematics is: (2 + i)³ is exactly 2 + 11i. On the real axis it answers as lz_power does, to the character, and a negative base to any other real power is the principal value. ii is e−π/2, a real number.
Nought to the power w is nought where the real part of w is above nought, the point at infinity where it is below, and refused where it is nought; anything to the power nought is one. An answer past the answer limit is refused, kTooLarge, the point at infinity.
Examples
| Call | Answer |
|---|---|
lzc_power( 2 + 1i, 3 + 0i ) | 2 + 11i |
lzc_power( −8 + 0i, 0.5 + 0i ) | 0 + 2.828427124746190097603377448419396157i |
lzc_power( 0 + 1i, 0 + 1i ) | 0.207879576350761908546955619834978770 + 0i |
lzc_power( 0 + 0i, 0 + 0i ) | 1 + 0i |
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_raise_nA complex number raised to a whole power.lzc_root_nThe principal root of complex order w, z^(1/w).lzc_exp_ee raised to a complex power.lz_powerThe left number raised to the power of the right.