addaptic

Reference Complex exponentials, logarithms, powers and roots

lzc_log_b

The principal logarithm to the base the number is written in.

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

ln z ÷ ln b, the principal value, where b is the base z is written in. Each part correctly rounded and exact where the mathematics is: in base ten the logarithm of −100 has a real part of exactly 2. Nought is refused, kUndefinedResult, the point at infinity.

Examples

CallAnswer
lzc_log_b( −100 + 0i )2.000000000000000000000000000000000000 + 1.364376353841841347485783625431355770i
lzc_log_b( 0 + 10i )1.000000000000000000000000000000000000 + 0.682188176920920673742891812715677885i

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_log_e The principal natural logarithm of a complex number.
  • lzc_log_n The principal logarithm of the right complex number to the base of the left.
  • lz_log_b The logarithm to the number's own base.