]>
Commit | Line | Data |
---|---|---|
a1eaacb1 | 1 | '\" t |
fea681da | 2 | .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) |
2297bf0e | 3 | .\" |
95fb8859 | 4 | .\" SPDX-License-Identifier: GPL-1.0-or-later |
fea681da | 5 | .\" |
4c1c5274 | 6 | .TH clog 3 (date) "Linux man-pages (unreleased)" |
fea681da MK |
7 | .SH NAME |
8 | clog, clogf, clogl \- natural logarithm of a complex number | |
2af19291 AC |
9 | .SH LIBRARY |
10 | Math library | |
8fc3b2cf | 11 | .RI ( libm ", " \-lm ) |
fea681da | 12 | .SH SYNOPSIS |
c7db92b9 | 13 | .nf |
fea681da | 14 | .B #include <complex.h> |
68e4db0a | 15 | .PP |
fea681da | 16 | .BI "double complex clog(double complex " z ); |
fea681da | 17 | .BI "float complex clogf(float complex " z ); |
fea681da | 18 | .BI "long double complex clogl(long double complex " z ); |
c7db92b9 | 19 | .fi |
fea681da | 20 | .SH DESCRIPTION |
7dffdbbd | 21 | These functions calculate the complex natural logarithm of |
defcc338 MK |
22 | .IR z , |
23 | with a branch cut along the negative real axis. | |
847e0d88 | 24 | .PP |
c1f2e990 MK |
25 | The logarithm |
26 | .BR clog () | |
27 | is the inverse function of the exponential | |
28 | .BR cexp (3). | |
658670de | 29 | Thus, if \fIy\ =\ clog(z)\fP, then \fIz\ =\ cexp(y)\fP. |
c13182ef MK |
30 | The imaginary part of |
31 | .I y | |
e17f9d28 | 32 | is chosen in the interval [\-pi,pi]. |
dd3568a1 | 33 | .PP |
658670de | 34 | One has: |
207050fa | 35 | .PP |
1ae6b2c7 AC |
36 | .in +4n |
37 | .EX | |
38 | clog(z) = log(cabs(z)) + I * carg(z) | |
39 | .EE | |
40 | .in | |
dd3568a1 | 41 | .PP |
c13182ef MK |
42 | Note that |
43 | .I z | |
44 | close to zero will cause an overflow. | |
4e1c6675 MS |
45 | .SH ATTRIBUTES |
46 | For an explanation of the terms used in this section, see | |
47 | .BR attributes (7). | |
48 | .TS | |
49 | allbox; | |
c466875e | 50 | lbx lb lb |
4e1c6675 MS |
51 | l l l. |
52 | Interface Attribute Value | |
53 | T{ | |
9e54434e BR |
54 | .na |
55 | .nh | |
4e1c6675 MS |
56 | .BR clog (), |
57 | .BR clogf (), | |
58 | .BR clogl () | |
59 | T} Thread safety MT-Safe | |
60 | .TE | |
c466875e | 61 | .sp 1 |
3113c7f3 | 62 | .SH STANDARDS |
4131356c AC |
63 | C11, POSIX.1-2008. |
64 | .SH HISTORY | |
65 | glibc 2.1. | |
66 | C99, POSIX.1-2001. | |
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) |