xref: /freebsd/lib/msun/man/tanpi.3 (revision f81cdf24ba5436367377f7c8e8f51f6df2a75ca7)
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 REGENTS 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 REGENTS 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 April 1, 2017
26.Dt TANPI 3
27.Os
28.Sh NAME
29.Nm tanpi ,
30.Nm tanpif ,
31.Nm tanpil
32.Nd half\(encycle tangent functions
33.Sh LIBRARY
34.Lb libm
35.Sh SYNOPSIS
36.In math.h
37.Ft double
38.Fn tanpi "double x"
39.Ft float
40.Fn tanpif "float x"
41.Ft long double
42.Fn tanpil "long double x"
43.Sh DESCRIPTION
44The
45.Fn tanpi ,
46.Fn tanpif ,
47and
48.Fn tanpil
49functions compute the tangent of
50.Fa "\(*p \(mu x"
51and measure angles in half-cycles.
52.Sh RETURN VALUES
53The
54.Fn tanpi ,
55.Fn tanpif ,
56and
57.Fn tanpil
58functions returns
59.Fn tan "\(*p \(mu x" .
60If \*(Bax\*(Ba \*(Ge 2^(p - 1)
61where p is the floating\(enpoint precision of
62.Ar x ,
63then the returned value is \*(Pm0 and it has no significance.
64.Sh SPECIAL VALUES
65.Bl -tag
66.It
67.Fn tanpi \*(Pm0
68returns \*(Pm0.
69.It
70.Fn tanpi \*(Pmn
71returns \*(Pm0 for positive integers
72.Ar n .
73.It
74.Fn tanpi \*(Pmn/2
75returns \*(Na for n > 0 and raises an FE_INVALID exception.
76.It
77.Fn tanpi \*(Pm\(if
78return an \*(Na and raises an FE_INVALID exception.
79.It
80.Fn tanpi \*(Na
81return an \*(Na and raises an FE_INVALID exception.
82.El
83.Sh SEE ALSO
84.Xr cos 3 ,
85.Xr cospi 3 ,
86.Xr fenv 3 ,
87.Xr math 3 ,
88.Xr sin 3 ,
89.Xr sinpi 3 ,
90.Xr tan 3
91.Sh AUTHORS
92The half\(encycle trignometric functions were written by
93.An Steven G. Kargl Aq Mt kargl@FreeBSD.org .
94.Sh STANDARDS
95These functions conform to
96IEEE Std 754\(tm\(en2008 ,
97\(dqIEEE Standard for Floating-Point Arithmetic\(dq
98and to
99ISO/IEC TS 18661-4 ,
100\(dqInformation technology \(em Programming languages, their environments,
101and system software interfaces \(em Floating\(enpoint extensions for
102C\(dq \(em Part 4: Supplementary functions.
103
104
105