1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" SPDX-License-Identifier: GPL-1.0-or-later
5 .TH CLOG 3 2021-03-22 GNU "Linux Programmer's Manual"
7 clog, clogf, clogl \- natural logarithm of a complex number
10 .RI ( libm ", " \-lm )
13 .B #include <complex.h>
15 .BI "double complex clog(double complex " z );
16 .BI "float complex clogf(float complex " z );
17 .BI "long double complex clogl(long double complex " z );
20 These functions calculate the complex natural logarithm of
22 with a branch cut along the negative real axis.
26 is the inverse function of the exponential
28 Thus, if \fIy\ =\ clog(z)\fP, then \fIz\ =\ cexp(y)\fP.
31 is chosen in the interval [\-pi,pi].
37 clog(z) = log(cabs(z)) + I * carg(z)
43 close to zero will cause an overflow.
45 These functions first appeared in glibc in version 2.1.
47 For an explanation of the terms used in this section, see
55 Interface Attribute Value
60 T} Thread safety MT-Safe
66 C99, POSIX.1-2001, POSIX.1-2008.