]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/clog.3
err.3: EXAMPLES: use EXIT_FAILURE rather than 1 as exit status
[thirdparty/man-pages.git] / man3 / clog.3
CommitLineData
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
9clog, 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 19Link with \fI\-lm\fP.
fea681da 20.SH DESCRIPTION
7dffdbbd 21These functions calculate the complex natural logarithm of
defcc338
MK
22.IR z ,
23with a branch cut along the negative real axis.
847e0d88 24.PP
c1f2e990
MK
25The logarithm
26.BR clog ()
27is the inverse function of the exponential
28.BR cexp (3).
658670de 29Thus, if \fIy\ =\ clog(z)\fP, then \fIz\ =\ cexp(y)\fP.
c13182ef
MK
30The imaginary part of
31.I y
e17f9d28 32is chosen in the interval [\-pi,pi].
dd3568a1 33.PP
658670de 34One 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
40Note that
41.I z
42close to zero will cause an overflow.
f0d7ce1d
MK
43.SH VERSIONS
44These functions first appeared in glibc in version 2.1.
4e1c6675
MS
45.SH ATTRIBUTES
46For an explanation of the terms used in this section, see
47.BR attributes (7).
48.TS
49allbox;
50lbw24 lb lb
51l l l.
52Interface Attribute Value
53T{
54.BR clog (),
55.BR clogf (),
56.BR clogl ()
57T} Thread safety MT-Safe
58.TE
47297adb 59.SH CONFORMING TO
9a74e018 60C99, 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)