]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
138b47a9 MK |
2 | .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk |
3 | .\" <mtk.manpages@gmail.com> | |
fea681da | 4 | .\" |
5fbde956 | 5 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
fea681da MK |
6 | .\" |
7 | .\" References consulted: | |
8 | .\" Linux libc source code | |
9 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
10 | .\" 386BSD man pages | |
11 | .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu) | |
12 | .\" Modified 2002-07-27 by Walter Harms | |
13 | .\" (walter.harms@informatik.uni-oldenburg.de) | |
14 | .\" | |
1ae6b2c7 | 15 | .TH ATANH 3 2021-03-22 GNU "Linux Programmer's Manual" |
fea681da MK |
16 | .SH NAME |
17 | atanh, atanhf, atanhl \- inverse hyperbolic tangent function | |
2af19291 AC |
18 | .SH LIBRARY |
19 | Math library | |
8fc3b2cf | 20 | .RI ( libm ", " \-lm ) |
fea681da MK |
21 | .SH SYNOPSIS |
22 | .nf | |
23 | .B #include <math.h> | |
68e4db0a | 24 | .PP |
fea681da | 25 | .BI "double atanh(double " x ); |
fea681da | 26 | .BI "float atanhf(float " x ); |
fea681da | 27 | .BI "long double atanhl(long double " x ); |
68e4db0a | 28 | .PP |
fea681da | 29 | .fi |
d39ad78f | 30 | .RS -4 |
cc4615cc MK |
31 | Feature Test Macro Requirements for glibc (see |
32 | .BR feature_test_macros (7)): | |
d39ad78f | 33 | .RE |
68e4db0a | 34 | .PP |
138b47a9 | 35 | .BR atanh (): |
9d2adbae | 36 | .nf |
5c10d2c5 MK |
37 | _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L |
38 | || _XOPEN_SOURCE >= 500 | |
39 | .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED | |
9d2adbae MK |
40 | || /* Since glibc 2.19: */ _DEFAULT_SOURCE |
41 | || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE | |
42 | .fi | |
dbfe9c70 | 43 | .PP |
cc4615cc MK |
44 | .BR atanhf (), |
45 | .BR atanhl (): | |
9d2adbae | 46 | .nf |
5c10d2c5 | 47 | _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L |
9d2adbae MK |
48 | || /* Since glibc 2.19: */ _DEFAULT_SOURCE |
49 | || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE | |
50 | .fi | |
fea681da | 51 | .SH DESCRIPTION |
5600f73a | 52 | These functions calculate the inverse hyperbolic tangent of |
022671eb MK |
53 | .IR x ; |
54 | that is the value whose hyperbolic tangent is | |
55 | .IR x . | |
47297adb | 56 | .SH RETURN VALUE |
138b47a9 MK |
57 | On success, these functions return the inverse hyperbolic tangent of |
58 | .IR x . | |
847e0d88 | 59 | .PP |
138b47a9 MK |
60 | If |
61 | .I x | |
62 | is a NaN, a NaN is returned. | |
847e0d88 | 63 | .PP |
138b47a9 MK |
64 | If |
65 | .I x | |
66 | is +0 (\-0), +0 (\-0) is returned. | |
847e0d88 | 67 | .PP |
138b47a9 MK |
68 | If |
69 | .I x | |
70 | is +1 or \-1, | |
efe294cb | 71 | a pole error occurs, |
138b47a9 MK |
72 | and the functions return |
73 | .BR HUGE_VAL , | |
74 | .BR HUGE_VALF , | |
75 | or | |
76 | .BR HUGE_VALL , | |
77 | respectively, with the mathematically correct sign. | |
847e0d88 | 78 | .PP |
138b47a9 MK |
79 | If the absolute value of |
80 | .I x | |
81 | is greater than 1, | |
efe294cb | 82 | a domain error occurs, |
138b47a9 MK |
83 | and a NaN is returned. |
84 | .\" | |
85 | .\" POSIX.1-2001 documents an optional range error for subnormal x; | |
86 | .\" glibc 2.8 does not do this. | |
fea681da | 87 | .SH ERRORS |
138b47a9 MK |
88 | See |
89 | .BR math_error (7) | |
90 | for information on how to determine whether an error has occurred | |
91 | when calling these functions. | |
92 | .PP | |
93 | The following errors can occur: | |
fea681da | 94 | .TP |
138b47a9 MK |
95 | Domain error: \fIx\fP less than \-1 or greater than +1 |
96 | .I errno | |
97 | is set to | |
98 | .BR EDOM . | |
99 | An invalid floating-point exception | |
100 | .RB ( FE_INVALID ) | |
101 | is raised. | |
102 | .TP | |
103 | Pole error: \fIx\fP is +1 or \-1 | |
104 | .I errno | |
105 | is set to | |
1ae6b2c7 | 106 | .B ERANGE |
138b47a9 | 107 | (but see BUGS). |
138b47a9 MK |
108 | A divide-by-zero floating-point exception |
109 | .RB ( FE_DIVBYZERO ) | |
110 | is raised. | |
2ea0152c MS |
111 | .SH ATTRIBUTES |
112 | For an explanation of the terms used in this section, see | |
113 | .BR attributes (7). | |
c466875e MK |
114 | .ad l |
115 | .nh | |
2ea0152c MS |
116 | .TS |
117 | allbox; | |
c466875e | 118 | lbx lb lb |
2ea0152c MS |
119 | l l l. |
120 | Interface Attribute Value | |
121 | T{ | |
122 | .BR atanh (), | |
123 | .BR atanhf (), | |
124 | .BR atanhl () | |
125 | T} Thread safety MT-Safe | |
126 | .TE | |
c466875e MK |
127 | .hy |
128 | .ad | |
129 | .sp 1 | |
47297adb | 130 | .SH CONFORMING TO |
9a74e018 | 131 | C99, POSIX.1-2001, POSIX.1-2008. |
847e0d88 | 132 | .PP |
138b47a9 MK |
133 | The variant returning |
134 | .I double | |
135 | also conforms to | |
7cada58c | 136 | SVr4, 4.3BSD. |
138b47a9 | 137 | .SH BUGS |
1f6982a0 MK |
138 | In glibc 2.9 and earlier, |
139 | .\" Bug: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6759 | |
138b47a9 | 140 | .\" This can be seen in sysdeps/ieee754/k_standard.c |
1f6982a0 | 141 | when a pole error occurs, |
138b47a9 | 142 | .I errno |
444cf9b1 | 143 | is set to |
1ae6b2c7 | 144 | .B EDOM |
1f6982a0 | 145 | instead of the POSIX-mandated |
138b47a9 | 146 | .BR ERANGE . |
1f6982a0 | 147 | Since version 2.10, glibc does the right thing. |
47297adb | 148 | .SH SEE ALSO |
fea681da MK |
149 | .BR acosh (3), |
150 | .BR asinh (3), | |
36268806 | 151 | .BR catanh (3), |
fea681da MK |
152 | .BR cosh (3), |
153 | .BR sinh (3), | |
154 | .BR tanh (3) |