| cln | Function (ROM Call 0x147)

math.h, timath.h

void cln (float z_re, float z_im, float *w_re, float *w_im);

Complex natural logarithm (base e).

cln calculates the natural logarithm w = ln(z) of the complex number which real and imaginary parts are z_re and z_im, and stores real and imaginary part of the result in floating point destinations pointed to by w_re and w_im. The complex logarithm is defined by
ln(z) = log(abs(z)) + i arg(z)
where abs(z) = sqrt(z_re^2+z_im^2), arg(z) = atan2(z_im, z_re) and log is the real natural logarithm. See also sqrt and atan2.

Uses: atan2, fabs, is_inf, is_nan, log, _bcd_math
Used by: clog10, push_exponentiate