README: Update links
[man-pages.git] / man3 / tanh.3
blob8fa78e3b41511ad9740c4bc444c1899912191aa3
1 '\" t
2 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
3 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
4 .\"     <mtk.manpages@gmail.com>
5 .\"
6 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
7 .\"
8 .\" References consulted:
9 .\"     Linux libc source code
10 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
11 .\"     386BSD man pages
12 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
13 .\" Modified 2002-07-27 by Walter Harms
14 .\"     (walter.harms@informatik.uni-oldenburg.de)
15 .\"
16 .TH tanh 3 (date) "Linux man-pages (unreleased)"
17 .SH NAME
18 tanh, tanhf, tanhl \- hyperbolic tangent function
19 .SH LIBRARY
20 Math library
21 .RI ( libm ", " \-lm )
22 .SH SYNOPSIS
23 .nf
24 .B #include <math.h>
26 .BI "double tanh(double " x );
27 .BI "float tanhf(float " x );
28 .BI "long double tanhl(long double " x );
29 .fi
31 .RS -4
32 Feature Test Macro Requirements for glibc (see
33 .BR feature_test_macros (7)):
34 .RE
36 .BR tanhf (),
37 .BR tanhl ():
38 .nf
39     _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
40         || /* Since glibc 2.19: */ _DEFAULT_SOURCE
41         || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
42 .fi
43 .SH DESCRIPTION
44 These functions return the hyperbolic tangent of
45 .IR x ,
46 which
47 is defined mathematically as:
49 .nf
50     tanh(x) = sinh(x) / cosh(x)
51 .fi
52 .SH RETURN VALUE
53 On success, these functions return the hyperbolic tangent of
54 .IR x .
57 .I x
58 is a NaN, a NaN is returned.
61 .I x
62 is +0 (\-0), +0 (\-0) is returned.
65 .I x
66 is positive infinity (negative infinity),
67 +1 (\-1) is returned.
68 .\"
69 .\" POSIX.1-2001 documents an optional range error (underflow)
70 .\" for subnormal x;
71 .\" glibc 2.8 does not do this.
72 .SH ERRORS
73 No errors occur.
74 .SH ATTRIBUTES
75 For an explanation of the terms used in this section, see
76 .BR attributes (7).
77 .TS
78 allbox;
79 lbx lb lb
80 l l l.
81 Interface       Attribute       Value
83 .na
84 .nh
85 .BR tanh (),
86 .BR tanhf (),
87 .BR tanhl ()
88 T}      Thread safety   MT-Safe
89 .TE
90 .SH STANDARDS
91 C11, POSIX.1-2008.
92 .SH HISTORY
93 C99, POSIX.1-2001.
95 The variant returning
96 .I double
97 also conforms to
98 SVr4, 4.3BSD, C89.
99 .SH SEE ALSO
100 .BR acosh (3),
101 .BR asinh (3),
102 .BR atanh (3),
103 .BR cosh (3),
104 .BR ctanh (3),
105 .BR sinh (3)