1CLOG(3)                    Linux Programmer's Manual                   CLOG(3)
2
3
4

NAME

6       clog, clogf, clogl - natural logarithm of a complex number
7

SYNOPSIS

9       #include <complex.h>
10
11       double complex clog(double complex z);
12       float complex clogf(float complex z);
13       long double complex clogl(long double complex z);
14
15       Link with -lm.
16

DESCRIPTION

18       These  functions  calculate  the complex natural logarithm of z, with a
19       branch cut along the negative real axis.
20
21       The logarithm  clog()  is  the  inverse  function  of  the  exponential
22       cexp(3).   Thus,  if y = clog(z), then z = cexp(y).  The imaginary part
23       of y is chosen in the interval [-pi,pi].
24
25       One has:
26
27           clog(z) = log(cabs(z)) + I * carg(z)
28
29       Note that z close to zero will cause an overflow.
30

VERSIONS

32       These functions first appeared in glibc in version 2.1.
33

ATTRIBUTES

35       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
36       tributes(7).
37
38       ┌────────────────────────────────────────────┬───────────────┬─────────┐
39Interface                                   Attribute     Value   
40       ├────────────────────────────────────────────┼───────────────┼─────────┤
41clog(), clogf(), clogl()                    │ Thread safety │ MT-Safe │
42       └────────────────────────────────────────────┴───────────────┴─────────┘
43

CONFORMING TO

45       C99, POSIX.1-2001, POSIX.1-2008.
46

SEE ALSO

48       cabs(3), cexp(3), clog10(3), clog2(3), complex(7)
49

COLOPHON

51       This  page  is  part of release 5.12 of the Linux man-pages project.  A
52       description of the project, information about reporting bugs,  and  the
53       latest     version     of     this    page,    can    be    found    at
54       https://www.kernel.org/doc/man-pages/.
55
56
57
58                                  2021-03-22                           CLOG(3)
Impressum