xref: /dragonfly/contrib/openbsd_libm/man/clog.3 (revision 31524921)
1.\"	$OpenBSD: clog.3,v 1.2 2013/06/05 03:40:26 tedu Exp $
2.\"
3.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: June 5 2013 $
18.Dt CLOG 3
19.Os
20.Sh NAME
21.Nm clog ,
22.Nm clogf ,
23.Nm clogl
24.Nd complex natural logarithm
25.Sh SYNOPSIS
26.In complex.h
27.Ft double complex
28.Fn clog "double complex z"
29.Ft float complex
30.Fn clogf "float complex z"
31.Ft long double complex
32.Fn clogl "long double complex z"
33.Sh DESCRIPTION
34The
35.Fn clog ,
36.Fn clogf
37and
38.Fn clogl
39functions compute the complex logarithm to the base
40.Ms e
41(2.718...) of
42.Fa z .
43.Pp
44If
45.Fa z
46= x + iy, then
47.Bd -literal -offset indent
48clog(z) = log(sqrt(x^2 + y^2)) + i atan(y / x).
49.Ed
50.Sh RETURN VALUES
51The
52.Fn clog ,
53.Fn clogf
54and
55.Fn clogl
56functions return the complex logarithm to the base
57.Ms e
58of
59.Fa z
60with imaginary part in the interval
61.Bq -Pi, Pi ,
62and unbounded real part.
63.Sh SEE ALSO
64.Xr cexp 3 ,
65.Xr cpow 3
66.Sh STANDARDS
67The
68.Fn clog ,
69.Fn clogf
70and
71.Fn clogl
72functions conform to
73.St -isoC-99 .
74