1TANH(P) POSIX Programmer's Manual TANH(P)
2
3
4
6 tanh, tanhf, tanhl - hyperbolic tangent functions
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
17 These functions shall compute the hyperbolic tangent of their argument
18 x.
19
20 An application wishing to check for error situations should set errno
21 to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these
22 functions. On return, if errno is non-zero or fetestexcept(FE_INVALID
23 | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an error has
24 occurred.
25
27 Upon successful completion, these functions shall return the hyperbolic
28 tangent of x.
29
30 If x is NaN, a NaN shall be returned.
31
32 If x is ±0, x shall be returned.
33
34 If x is ±Inf, ±1 shall be returned.
35
36 If x is subnormal, a range error may occur and x should be returned.
37
39 These functions may fail if:
40
41 Range Error
42 The value of x is subnormal.
43
44 If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
45 then errno shall be set to [ERANGE]. If the integer expression
46 (math_errhandling & MATH_ERREXCEPT) is non-zero, then the underflow
47 floating-point exception shall be raised.
48
49
50 The following sections are informative.
51
53 None.
54
56 On error, the expressions (math_errhandling & MATH_ERRNO) and
57 (math_errhandling & MATH_ERREXCEPT) are independent of each other, but
58 at least one of them must be non-zero.
59
61 None.
62
64 None.
65
67 atanh() , feclearexcept() , fetestexcept() , isnan() , tan() , the Base
68 Definitions volume of IEEE Std 1003.1-2001, Section 4.18, Treatment of
69 Error Conditions for Mathematical Functions, <math.h>
70
72 Portions of this text are reprinted and reproduced in electronic form
73 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
74 -- Portable Operating System Interface (POSIX), The Open Group Base
75 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
76 Electrical and Electronics Engineers, Inc and The Open Group. In the
77 event of any discrepancy between this version and the original IEEE and
78 The Open Group Standard, the original IEEE and The Open Group Standard
79 is the referee document. The original Standard can be obtained online
80 at http://www.opengroup.org/unix/online.html .
81
82
83
84IEEE/The Open Group 2003 TANH(P)