]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/clog.3
Many pages: Fix style issues reported by `make lint-groff`
[thirdparty/man-pages.git] / man3 / clog.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"
3 .\" SPDX-License-Identifier: GPL-1.0-or-later
4 .\"
5 .TH CLOG 3 2021-03-22 GNU "Linux Programmer's Manual"
6 .SH NAME
7 clog, clogf, clogl \- natural logarithm of a complex number
8 .SH LIBRARY
9 Math library
10 .RI ( libm ", " \-lm )
11 .SH SYNOPSIS
12 .nf
13 .B #include <complex.h>
14 .PP
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 );
18 .fi
19 .SH DESCRIPTION
20 These functions calculate the complex natural logarithm of
21 .IR z ,
22 with a branch cut along the negative real axis.
23 .PP
24 The logarithm
25 .BR clog ()
26 is the inverse function of the exponential
27 .BR cexp (3).
28 Thus, if \fIy\ =\ clog(z)\fP, then \fIz\ =\ cexp(y)\fP.
29 The imaginary part of
30 .I y
31 is chosen in the interval [\-pi,pi].
32 .PP
33 One has:
34 .PP
35 .in +4n
36 .EX
37 clog(z) = log(cabs(z)) + I * carg(z)
38 .EE
39 .in
40 .PP
41 Note that
42 .I z
43 close to zero will cause an overflow.
44 .SH VERSIONS
45 These functions first appeared in glibc in version 2.1.
46 .SH ATTRIBUTES
47 For an explanation of the terms used in this section, see
48 .BR attributes (7).
49 .ad l
50 .nh
51 .TS
52 allbox;
53 lbx lb lb
54 l l l.
55 Interface Attribute Value
56 T{
57 .BR clog (),
58 .BR clogf (),
59 .BR clogl ()
60 T} Thread safety MT-Safe
61 .TE
62 .hy
63 .ad
64 .sp 1
65 .SH CONFORMING TO
66 C99, POSIX.1-2001, POSIX.1-2008.
67 .SH SEE ALSO
68 .BR cabs (3),
69 .BR cexp (3),
70 .BR clog10 (3),
71 .BR clog2 (3),
72 .BR complex (7)