Import OpenBSD's libm (trunk, 4 July 2015) to a new vendor branch
[dragonfly.git] / contrib / openbsd_libm / man / ctan.3
1 .\"     $OpenBSD: ctan.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 CTAN 3
19 .Os
20 .Sh NAME
21 .Nm ctan ,
22 .Nm ctanf ,
23 .Nm ctanl
24 .Nd complex circular tangent
25 .Sh SYNOPSIS
26 .In complex.h
27 .Ft double complex
28 .Fn ctan "double complex z"
29 .Ft float complex
30 .Fn ctanf "float complex z"
31 .Ft long double complex
32 .Fn ctanl "long double complex z"
33 .Sh DESCRIPTION
34 The
35 .Fn ctan ,
36 .Fn ctanf
37 and
38 .Fn ctanl
39 functions compute the complex circular tangent of
40 .Fa z .
41 .Pp
42 If
43 .Fa z
44 = x + iy, then
45 .Bd -literal -offset indent
46 ctan(z) = (sin(2x) + i sinh(2y)) / (cos(2x) + cosh(2y)).
47 .Ed
48 .Pp
49 On the real axis the denominator is zero at odd multiples of Pi/2.
50 The denominator is evaluated by its Taylor series near these points.
51 .Bd -literal -offset indent
52 ctan(z) = -i ctanh(iz).
53 .Ed
54 .Sh RETURN VALUES
55 The
56 .Fn ctan ,
57 .Fn ctanf
58 and
59 .Fn ctanl
60 functions return the complex circular tangent of
61 .Fa z .
62 .Sh SEE ALSO
63 .Xr ccos 3 ,
64 .Xr csin 3
65 .Sh STANDARDS
66 The
67 .Fn ctan ,
68 .Fn ctanf
69 and
70 .Fn ctanl
71 functions conform to
72 .St -isoC-99 .