log

Natural logarithm, complex

Returns complex logarithm to the base e (2.718...) of the complex argument x.

If z = x + iy, then log(z) = log(abs(z)) + i arctan(y/x).

The arctangent ranges from -PI to +PI. There are branch cuts along both the negative real and negative imaginary axes. For pure imaginary arguments, use one of the following forms, depending on which branch is required.

log( 0.0 + yi) = log(-y) + PI_2i  // y<=-0.0
log(-0.0 + yi) = log(-y) - PI_2i  // y<=-0.0
  1. real log(real x)
  2. creal log(creal z)
    deprecated
    creal
    log
    (
    creal z
    )

Meta