]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/clog.3
malloc.3: srcfix
[thirdparty/man-pages.git] / man3 / clog.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" Distributed under GPL
5 .\" %%%LICENSE_END
6 .\"
7 .TH CLOG 3 2017-09-15 "" "Linux Programmer's Manual"
8 .SH NAME
9 clog, clogf, clogl \- natural logarithm of a complex number
10 .SH SYNOPSIS
11 .B #include <complex.h>
12 .PP
13 .BI "double complex clog(double complex " z );
14 .br
15 .BI "float complex clogf(float complex " z );
16 .br
17 .BI "long double complex clogl(long double complex " z );
18 .PP
19 Link with \fI\-lm\fP.
20 .SH DESCRIPTION
21 These functions calculate the complex natural logarithm of
22 .IR z ,
23 with a branch cut along the negative real axis.
24 .PP
25 The logarithm
26 .BR clog ()
27 is the inverse function of the exponential
28 .BR cexp (3).
29 Thus, if \fIy\ =\ clog(z)\fP, then \fIz\ =\ cexp(y)\fP.
30 The imaginary part of
31 .I y
32 is chosen in the interval [\-pi,pi].
33 .PP
34 One has:
35 .PP
36 .nf
37 clog(z) = log(cabs(z)) + I * carg(z)
38 .fi
39 .PP
40 Note that
41 .I z
42 close to zero will cause an overflow.
43 .SH VERSIONS
44 These functions first appeared in glibc in version 2.1.
45 .SH ATTRIBUTES
46 For an explanation of the terms used in this section, see
47 .BR attributes (7).
48 .TS
49 allbox;
50 lbw24 lb lb
51 l l l.
52 Interface Attribute Value
53 T{
54 .BR clog (),
55 .BR clogf (),
56 .BR clogl ()
57 T} Thread safety MT-Safe
58 .TE
59 .SH CONFORMING TO
60 C99, POSIX.1-2001, POSIX.1-2008.
61 .SH SEE ALSO
62 .BR cabs (3),
63 .BR cexp (3),
64 .BR clog10 (3),
65 .BR clog2 (3),
66 .BR complex (7)