1TANH(3) Linux Programmer's Manual TANH(3)
2
3
4
6 tanh, tanhf, tanhl - hyperbolic tangent function
7
9 #include <math.h>
10
11 double tanh(double x);
12 float tanhf(float x);
13 long double tanhl(long double x);
14
15 Link with -lm.
16
17 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19 tanhf(), tanhl(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600
20 || _ISOC99_SOURCE; or cc -std=c99
21
23 The tanh() function returns the hyperbolic tangent of x, which is
24 defined mathematically as:
25
26 tanh(x) = sinh(x) / cosh(x)
27
29 On success, these functions return the hyperbolic tangent of x.
30
31 If x is a NaN, a NaN is returned.
32
33 If x is +0 (-0), +0 (-0) is returned.
34
35 If x is positive infinity (negative infinity), +1 (-1) is returned.
36
38 No errors occur.
39
41 C99, POSIX.1-2001. The variant returning double also conforms to SVr4,
42 4.3BSD, C89.
43
45 acosh(3), asinh(3), atanh(3), cosh(3), ctanh(3), sinh(3)
46
48 This page is part of release 3.22 of the Linux man-pages project. A
49 description of the project, and information about reporting bugs, can
50 be found at http://www.kernel.org/doc/man-pages/.
51
52
53
54 2008-08-05 TANH(3)