xref: /freebsd/lib/msun/man/clog.3 (revision 8e93258f2686c76b4e3b384a904d8b4413976229)
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.\" $FreeBSD$
26.\"
27.Dd June 6, 2018
28.Dt CLOG 3
29.Os
30.Sh NAME
31.Nm clog ,
32.Nm clogf
33and
34.Nm clogl
35.Nd complex natural logarithm functions
36.Sh LIBRARY
37.Lb libm
38.Sh SYNOPSIS
39.In complex.h
40.Ft double complex
41.Fn clog "double complex z"
42.Ft float complex
43.Fn clogf "float complex z"
44.Ft long double complex
45.Fn clogl "long double complex z"
46.Sh DESCRIPTION
47The
48.Fn clog ,
49.Fn clogf ,
50and
51.Fn clogl
52functions compute the complex natural logarithm of
53.Fa z .
54with a branch cut along the negative real axis .
55.Sh RETURN VALUES
56The
57.Fn clog
58function returns the complex natural logarithm value, in the
59range of a strip mathematically unbounded along the real axis and in
60the interval [-I* \*(Pi , +I* \*(Pi ] along the imaginary axis.
61The function satisfies the relationship:
62.Fo clog
63.Fn conj "z" Fc
64=
65.Fo conj
66.Fn clog "z" Fc .
67.Pp
68.\" Table is formatted for an 80-column xterm.
69.Bl -column ".Sy +\*(If + I*\*(Na" ".Sy Return value" ".Sy Divide-by-zero exception"
70.It Sy Argument          Ta Sy Return value Ta Sy Comment
71.It -0 + I*0             Ta -\*(If + I*\*(Pi    Ta Divide-by-zero exception
72.It                      Ta                     Ta raised
73.It +0 + I*0             Ta -\*(If + I*0        Ta Divide by zero exception
74.It                      Ta                     Ta raised
75.It x + I*\*(If          Ta +\*(If + I*\*(Pi/2  Ta For finite x
76.It x + I*\*(Na          Ta  \*(Na + I*\*(Na    Ta Optionally raises invalid
77.It                      Ta                     Ta floating-point exception
78.It                      Ta                     Ta for finite x
79.It -\*(If + I*y         Ta +\*(If + I*\*(Pi    Ta For finite positive-signed y
80.It +\*(If + I*y         Ta +\*(If + I*0        Ta For finite positive-signed y
81.It -\*(If + I*\*(If     Ta +\*(If + I*3\*(Pi/4
82.It +\*(If + I*\*(If     Ta +\*(If + I*\*(Pi/4
83.It \*(Pm\*(If + I*\*(Na Ta +\*(If + I*\*(Na
84.It \*(Na + I*y          Ta \*(Na + I*\*(Na    Ta Optionally raises invalid
85.It                      Ta                    Ta floating-point exception
86.It                      Ta                    Ta for finite y
87.It \*(Na + I*\*(If      Ta +\*(If + I*\*(Na
88.It \*(Na + I*\*(Na      Ta \*(Na + I*\*(Na
89.El
90.Sh SEE ALSO
91.Xr complex 3 ,
92.Xr log 3 ,
93.Xr math 3
94.Sh STANDARDS
95The
96.Fn clog ,
97.Fn cexpf ,
98and
99.Fn clogl
100functions conform to
101.St -isoC-99 .
102