Debian Codegraph @

upstream/debian-trixie/man3/clog.3

raw
1 '\" t
2 .\" Copyright 2002 Walter Harms ([email protected])
3 .\"
4 .\" SPDX-License-Identifier: GPL-1.0-or-later
5 .\"
6 .TH clog 3 2024-05-02 "Linux man-pages 6.9.1"
7 .SH NAME
8 clog, clogf, clogl \- natural logarithm of a complex number
9 .SH LIBRARY
10 Math library
11 .RI ( libm ", " \-lm )
12 .SH SYNOPSIS
13 .nf
14 .B #include <complex.h>
15 .P
16 .BI "double complex clog(double complex " z );
17 .BI "float complex clogf(float complex " z );
18 .BI "long double complex clogl(long double complex " z );
19 .fi
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 .P
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 .P
34 One has:
35 .P
36 .in +4n
37 .EX
38 clog(z) = log(cabs(z)) + I * carg(z)
39 .EE
40 .in
41 .P
42 Note that
43 .I z
44 close to zero will cause an overflow.
45 .SH ATTRIBUTES
46 For an explanation of the terms used in this section, see
47 .BR attributes (7).
48 .TS
49 allbox;
50 lbx lb lb
51 l l l.
52 Interface Attribute Value
53 T{
54 .na
55 .nh
56 .BR clog (),
57 .BR clogf (),
58 .BR clogl ()
59 T} Thread safety MT-Safe
60 .TE
61 .SH STANDARDS
62 C11, POSIX.1-2008.
63 .SH HISTORY
64 glibc 2.1.
65 C99, POSIX.1-2001.
66 .SH SEE ALSO
67 .BR cabs (3),
68 .BR cexp (3),
69 .BR clog10 (3),
70 .BR clog2 (3),
71 .BR complex (7)