]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) |
2297bf0e | 2 | .\" |
95fb8859 | 3 | .\" SPDX-License-Identifier: GPL-1.0-or-later |
fea681da | 4 | .\" |
1ae6b2c7 | 5 | .TH CLOG 3 2021-03-22 GNU "Linux Programmer's Manual" |
fea681da MK |
6 | .SH NAME |
7 | clog, clogf, clogl \- natural logarithm of a complex number | |
2af19291 AC |
8 | .SH LIBRARY |
9 | Math library | |
8fc3b2cf | 10 | .RI ( libm ", " \-lm ) |
fea681da | 11 | .SH SYNOPSIS |
c7db92b9 | 12 | .nf |
fea681da | 13 | .B #include <complex.h> |
68e4db0a | 14 | .PP |
fea681da | 15 | .BI "double complex clog(double complex " z ); |
fea681da | 16 | .BI "float complex clogf(float complex " z ); |
fea681da | 17 | .BI "long double complex clogl(long double complex " z ); |
c7db92b9 | 18 | .fi |
fea681da | 19 | .SH DESCRIPTION |
7dffdbbd | 20 | These functions calculate the complex natural logarithm of |
defcc338 MK |
21 | .IR z , |
22 | with a branch cut along the negative real axis. | |
847e0d88 | 23 | .PP |
c1f2e990 MK |
24 | The logarithm |
25 | .BR clog () | |
26 | is the inverse function of the exponential | |
27 | .BR cexp (3). | |
658670de | 28 | Thus, if \fIy\ =\ clog(z)\fP, then \fIz\ =\ cexp(y)\fP. |
c13182ef MK |
29 | The imaginary part of |
30 | .I y | |
e17f9d28 | 31 | is chosen in the interval [\-pi,pi]. |
dd3568a1 | 32 | .PP |
658670de | 33 | One has: |
207050fa | 34 | .PP |
1ae6b2c7 AC |
35 | .in +4n |
36 | .EX | |
37 | clog(z) = log(cabs(z)) + I * carg(z) | |
38 | .EE | |
39 | .in | |
dd3568a1 | 40 | .PP |
c13182ef MK |
41 | Note that |
42 | .I z | |
43 | close to zero will cause an overflow. | |
f0d7ce1d MK |
44 | .SH VERSIONS |
45 | These functions first appeared in glibc in version 2.1. | |
4e1c6675 MS |
46 | .SH ATTRIBUTES |
47 | For an explanation of the terms used in this section, see | |
48 | .BR attributes (7). | |
c466875e MK |
49 | .ad l |
50 | .nh | |
4e1c6675 MS |
51 | .TS |
52 | allbox; | |
c466875e | 53 | lbx lb lb |
4e1c6675 MS |
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 | |
c466875e MK |
62 | .hy |
63 | .ad | |
64 | .sp 1 | |
47297adb | 65 | .SH CONFORMING TO |
9a74e018 | 66 | C99, POSIX.1-2001, POSIX.1-2008. |
47297adb | 67 | .SH SEE ALSO |
fea681da MK |
68 | .BR cabs (3), |
69 | .BR cexp (3), | |
70 | .BR clog10 (3), | |
75398312 | 71 | .BR clog2 (3), |
a8bda636 | 72 | .BR complex (7) |