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