1clog(3) Library Functions Manual clog(3)
2
3
4
6 clog, clogf, clogl - natural logarithm of a complex number
7
9 Math library (libm, -lm)
10
12 #include <complex.h>
13
14 double complex clog(double complex z);
15 float complex clogf(float complex z);
16 long double complex clogl(long double complex z);
17
19 These functions calculate the complex natural logarithm of z, with a
20 branch cut along the negative real axis.
21
22 The logarithm clog() is the inverse function of the exponential
23 cexp(3). Thus, if y = clog(z), then z = cexp(y). The imaginary part
24 of y is chosen in the interval [-pi,pi].
25
26 One has:
27
28 clog(z) = log(cabs(z)) + I * carg(z)
29
30 Note that z close to zero will cause an overflow.
31
33 For an explanation of the terms used in this section, see at‐
34 tributes(7).
35
36 ┌────────────────────────────────────────────┬───────────────┬─────────┐
37 │Interface │ Attribute │ Value │
38 ├────────────────────────────────────────────┼───────────────┼─────────┤
39 │clog(), clogf(), clogl() │ Thread safety │ MT-Safe │
40 └────────────────────────────────────────────┴───────────────┴─────────┘
41
43 C11, POSIX.1-2008.
44
46 glibc 2.1. C99, POSIX.1-2001.
47
49 cabs(3), cexp(3), clog10(3), clog2(3), complex(7)
50
51
52
53Linux man-pages 6.05 2023-07-20 clog(3)