1tanh(3)                    Library Functions Manual                    tanh(3)
2
3
4

NAME

6       tanh, tanhf, tanhl - hyperbolic tangent function
7

LIBRARY

9       Math library (libm, -lm)
10

SYNOPSIS

12       #include <math.h>
13
14       double tanh(double x);
15       float tanhf(float x);
16       long double tanhl(long double x);
17
18   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
19
20       tanhf(), tanhl():
21           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
22               || /* Since glibc 2.19: */ _DEFAULT_SOURCE
23               || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
24

DESCRIPTION

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

RETURN VALUE

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

ERRORS

41       No errors occur.
42

ATTRIBUTES

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

STANDARDS

54       C11, POSIX.1-2008.
55

HISTORY

57       C99, POSIX.1-2001.
58
59       The variant returning double also conforms to SVr4, 4.3BSD, C89.
60

SEE ALSO

62       acosh(3), asinh(3), atanh(3), cosh(3), ctanh(3), sinh(3)
63
64
65
66Linux man-pages 6.05              2023-07-20                           tanh(3)
Impressum