]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/tanh.3
Many pages: Fix style issues reported by `make lint-groff`
[thirdparty/man-pages.git] / man3 / tanh.3
CommitLineData
fea681da 1.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
3c0484a7
MK
2.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3.\" <mtk.manpages@gmail.com>
fea681da 4.\"
5fbde956 5.\" SPDX-License-Identifier: Linux-man-pages-copyleft
fea681da
MK
6.\"
7.\" References consulted:
8.\" Linux libc source code
9.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
10.\" 386BSD man pages
11.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
12.\" Modified 2002-07-27 by Walter Harms
13.\" (walter.harms@informatik.uni-oldenburg.de)
14.\"
1ae6b2c7 15.TH TANH 3 2021-03-22 GNU "Linux Programmer's Manual"
fea681da
MK
16.SH NAME
17tanh, tanhf, tanhl \- hyperbolic tangent function
e2834964
AC
18.SH LIBRARY
19Math library
8fc3b2cf 20.RI ( libm ", " \-lm )
fea681da
MK
21.SH SYNOPSIS
22.nf
23.B #include <math.h>
68e4db0a 24.PP
fea681da 25.BI "double tanh(double " x );
fea681da 26.BI "float tanhf(float " x );
fea681da
MK
27.BI "long double tanhl(long double " x );
28.fi
68e4db0a 29.PP
d39ad78f 30.RS -4
3c0484a7
MK
31Feature Test Macro Requirements for glibc (see
32.BR feature_test_macros (7)):
d39ad78f 33.RE
68e4db0a 34.PP
3c0484a7
MK
35.BR tanhf (),
36.BR tanhl ():
9d2adbae 37.nf
5c10d2c5 38 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
9d2adbae
MK
39 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
40 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
41.fi
fea681da 42.SH DESCRIPTION
5600f73a 43These functions return the hyperbolic tangent of
022671eb
MK
44.IR x ,
45which
658670de 46is defined mathematically as:
a2b7a144 47.PP
658670de 48.nf
658670de 49 tanh(x) = sinh(x) / cosh(x)
494fc522 50.fi
47297adb 51.SH RETURN VALUE
3c0484a7
MK
52On success, these functions return the hyperbolic tangent of
53.IR x .
847e0d88 54.PP
3c0484a7
MK
55If
56.I x
57is a NaN, a NaN is returned.
847e0d88 58.PP
3c0484a7
MK
59If
60.I x
61is +0 (\-0), +0 (\-0) is returned.
847e0d88 62.PP
3c0484a7
MK
63If
64.I x
65is positive infinity (negative infinity),
66+1 (\-1) is returned.
67.\"
385cf745 68.\" POSIX.1-2001 documents an optional range error (underflow)
3c0484a7
MK
69.\" for subnormal x;
70.\" glibc 2.8 does not do this.
71.SH ERRORS
72No errors occur.
38d62724 73.SH ATTRIBUTES
f4ededc1
PH
74For an explanation of the terms used in this section, see
75.BR attributes (7).
c466875e
MK
76.ad l
77.nh
f4ededc1
PH
78.TS
79allbox;
c466875e 80lbx lb lb
f4ededc1
PH
81l l l.
82Interface Attribute Value
83T{
38d62724
PH
84.BR tanh (),
85.BR tanhf (),
38d62724 86.BR tanhl ()
f4ededc1
PH
87T} Thread safety MT-Safe
88.TE
c466875e
MK
89.hy
90.ad
91.sp 1
47297adb 92.SH CONFORMING TO
9a74e018 93C99, POSIX.1-2001, POSIX.1-2008.
847e0d88 94.PP
3c0484a7
MK
95The variant returning
96.I double
97also conforms to
68e1685c 98SVr4, 4.3BSD, C89.
47297adb 99.SH SEE ALSO
fea681da
MK
100.BR acosh (3),
101.BR asinh (3),
102.BR atanh (3),
103.BR cosh (3),
36268806 104.BR ctanh (3),
fea681da 105.BR sinh (3)