1TANH(3)                    Linux Programmer's Manual                   TANH(3)
2
3
4

NAME

6       tanh, tanhf, tanhl - hyperbolic tangent function
7

SYNOPSIS

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():
20           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
21               || /* Since glibc 2.19: */ _DEFAULT_SOURCE
22               || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
23

DESCRIPTION

25       These  functions  return  the hyperbolic tangent of x, which is defined
26       mathematically as:
27
28           tanh(x) = sinh(x) / cosh(x)
29

RETURN VALUE

31       On success, these functions return the hyperbolic tangent of x.
32
33       If x is a NaN, a NaN is returned.
34
35       If x is +0 (-0), +0 (-0) is returned.
36
37       If x is positive infinity (negative infinity), +1 (-1) is returned.
38

ERRORS

40       No errors occur.
41

ATTRIBUTES

43       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
44       tributes(7).
45
46       ┌────────────────────────────────────────────┬───────────────┬─────────┐
47Interface                                   Attribute     Value   
48       ├────────────────────────────────────────────┼───────────────┼─────────┤
49tanh(), tanhf(), tanhl()                    │ Thread safety │ MT-Safe │
50       └────────────────────────────────────────────┴───────────────┴─────────┘
51

CONFORMING TO

53       C99, POSIX.1-2001, POSIX.1-2008.
54
55       The variant returning double also conforms to SVr4, 4.3BSD, C89.
56

SEE ALSO

58       acosh(3), asinh(3), atanh(3), cosh(3), ctanh(3), sinh(3)
59

COLOPHON

61       This  page  is  part of release 5.13 of the Linux man-pages project.  A
62       description of the project, information about reporting bugs,  and  the
63       latest     version     of     this    page,    can    be    found    at
64       https://www.kernel.org/doc/man-pages/.
65
66
67
68                                  2021-03-22                           TANH(3)
Impressum