]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) |
2297bf0e | 2 | .\" |
38f20bb9 | 3 | .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) |
fea681da | 4 | .\" Distributed under GPL |
38f20bb9 | 5 | .\" %%%LICENSE_END |
fea681da | 6 | .\" |
4b8c67d9 | 7 | .TH CLOG 3 2017-09-15 "" "Linux Programmer's Manual" |
fea681da MK |
8 | .SH NAME |
9 | clog, clogf, clogl \- natural logarithm of a complex number | |
10 | .SH SYNOPSIS | |
11 | .B #include <complex.h> | |
68e4db0a | 12 | .PP |
fea681da | 13 | .BI "double complex clog(double complex " z ); |
d39541ec | 14 | .br |
fea681da | 15 | .BI "float complex clogf(float complex " z ); |
d39541ec | 16 | .br |
fea681da | 17 | .BI "long double complex clogl(long double complex " z ); |
68e4db0a | 18 | .PP |
20c58d70 | 19 | Link with \fI\-lm\fP. |
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 |
658670de | 36 | .nf |
658670de MK |
37 | clog(z) = log(cabs(z)) + I * carg(z) |
38 | .fi | |
dd3568a1 | 39 | .PP |
c13182ef MK |
40 | Note that |
41 | .I z | |
42 | close to zero will cause an overflow. | |
f0d7ce1d MK |
43 | .SH VERSIONS |
44 | These functions first appeared in glibc in version 2.1. | |
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; | |
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 | |
47297adb | 59 | .SH CONFORMING TO |
9a74e018 | 60 | C99, POSIX.1-2001, POSIX.1-2008. |
47297adb | 61 | .SH SEE ALSO |
fea681da MK |
62 | .BR cabs (3), |
63 | .BR cexp (3), | |
64 | .BR clog10 (3), | |
75398312 | 65 | .BR clog2 (3), |
a8bda636 | 66 | .BR complex (7) |