xref: /freebsd/lib/msun/man/clog.3 (revision 6137b5f7b8c183ee8806d79b3f1d8e5e3ddb3df3)
1.\" Copyright (c) 2017 Steven G. Kargl <kargl@FreeBSD.org>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.Dd June 6, 2018
26.Dt CLOG 3
27.Os
28.Sh NAME
29.Nm clog ,
30.Nm clogf
31and
32.Nm clogl
33.Nd complex natural logarithm functions
34.Sh LIBRARY
35.Lb libm
36.Sh SYNOPSIS
37.In complex.h
38.Ft double complex
39.Fn clog "double complex z"
40.Ft float complex
41.Fn clogf "float complex z"
42.Ft long double complex
43.Fn clogl "long double complex z"
44.Sh DESCRIPTION
45The
46.Fn clog ,
47.Fn clogf ,
48and
49.Fn clogl
50functions compute the complex natural logarithm of
51.Fa z .
52with a branch cut along the negative real axis .
53.Sh RETURN VALUES
54The
55.Fn clog
56function returns the complex natural logarithm value, in the
57range of a strip mathematically unbounded along the real axis and in
58the interval [-I* \*(Pi , +I* \*(Pi ] along the imaginary axis.
59The function satisfies the relationship:
60.Fo clog
61.Fn conj "z" Fc
62=
63.Fo conj
64.Fn clog "z" Fc .
65.Pp
66.\" Table is formatted for an 80-column xterm.
67.Bl -column ".Sy +\*(If + I*\*(Na" ".Sy Return value" ".Sy Divide-by-zero exception"
68.It Sy Argument          Ta Sy Return value Ta Sy Comment
69.It -0 + I*0             Ta -\*(If + I*\*(Pi    Ta Divide-by-zero exception
70.It                      Ta                     Ta raised
71.It +0 + I*0             Ta -\*(If + I*0        Ta Divide by zero exception
72.It                      Ta                     Ta raised
73.It x + I*\*(If          Ta +\*(If + I*\*(Pi/2  Ta For finite x
74.It x + I*\*(Na          Ta  \*(Na + I*\*(Na    Ta Optionally raises invalid
75.It                      Ta                     Ta floating-point exception
76.It                      Ta                     Ta for finite x
77.It -\*(If + I*y         Ta +\*(If + I*\*(Pi    Ta For finite positive-signed y
78.It +\*(If + I*y         Ta +\*(If + I*0        Ta For finite positive-signed y
79.It -\*(If + I*\*(If     Ta +\*(If + I*3\*(Pi/4
80.It +\*(If + I*\*(If     Ta +\*(If + I*\*(Pi/4
81.It \*(Pm\*(If + I*\*(Na Ta +\*(If + I*\*(Na
82.It \*(Na + I*y          Ta \*(Na + I*\*(Na    Ta Optionally raises invalid
83.It                      Ta                    Ta floating-point exception
84.It                      Ta                    Ta for finite y
85.It \*(Na + I*\*(If      Ta +\*(If + I*\*(Na
86.It \*(Na + I*\*(Na      Ta \*(Na + I*\*(Na
87.El
88.Sh SEE ALSO
89.Xr complex 3 ,
90.Xr log 3 ,
91.Xr math 3
92.Sh STANDARDS
93The
94.Fn clog ,
95.Fn cexpf ,
96and
97.Fn clogl
98functions conform to
99.St -isoC-99 .
100