]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/atanh.3
23c2878fde43f4b8d224bca45c035eb0e5798d12
[thirdparty/man-pages.git] / man3 / atanh.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
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 .\"
15 .TH ATANH 3 2021-03-22 "" "Linux Programmer's Manual"
16 .SH NAME
17 atanh, atanhf, atanhl \- inverse hyperbolic tangent function
18 .SH LIBRARY
19 Math library
20 .RI ( libm ", " \-lm )
21 .SH SYNOPSIS
22 .nf
23 .B #include <math.h>
24 .PP
25 .BI "double atanh(double " x );
26 .BI "float atanhf(float " x );
27 .BI "long double atanhl(long double " x );
28 .PP
29 .fi
30 .RS -4
31 Feature Test Macro Requirements for glibc (see
32 .BR feature_test_macros (7)):
33 .RE
34 .PP
35 .BR atanh ():
36 .nf
37 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
38 || _XOPEN_SOURCE >= 500
39 .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
40 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
41 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
42 .fi
43 .PP
44 .BR atanhf (),
45 .BR atanhl ():
46 .nf
47 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
48 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
49 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
50 .fi
51 .SH DESCRIPTION
52 These functions calculate the inverse hyperbolic tangent of
53 .IR x ;
54 that is the value whose hyperbolic tangent is
55 .IR x .
56 .SH RETURN VALUE
57 On success, these functions return the inverse hyperbolic tangent of
58 .IR x .
59 .PP
60 If
61 .I x
62 is a NaN, a NaN is returned.
63 .PP
64 If
65 .I x
66 is +0 (\-0), +0 (\-0) is returned.
67 .PP
68 If
69 .I x
70 is +1 or \-1,
71 a pole error occurs,
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.
78 .PP
79 If the absolute value of
80 .I x
81 is greater than 1,
82 a domain error occurs,
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.
87 .SH ERRORS
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:
94 .TP
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
106 .BR ERANGE
107 (but see BUGS).
108 A divide-by-zero floating-point exception
109 .RB ( FE_DIVBYZERO )
110 is raised.
111 .SH ATTRIBUTES
112 For an explanation of the terms used in this section, see
113 .BR attributes (7).
114 .ad l
115 .nh
116 .TS
117 allbox;
118 lbx lb lb
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
127 .hy
128 .ad
129 .sp 1
130 .SH CONFORMING TO
131 C99, POSIX.1-2001, POSIX.1-2008.
132 .PP
133 The variant returning
134 .I double
135 also conforms to
136 SVr4, 4.3BSD.
137 .SH BUGS
138 In glibc 2.9 and earlier,
139 .\" Bug: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6759
140 .\" This can be seen in sysdeps/ieee754/k_standard.c
141 when a pole error occurs,
142 .I errno
143 is set to
144 .BR EDOM
145 instead of the POSIX-mandated
146 .BR ERANGE .
147 Since version 2.10, glibc does the right thing.
148 .SH SEE ALSO
149 .BR acosh (3),
150 .BR asinh (3),
151 .BR catanh (3),
152 .BR cosh (3),
153 .BR sinh (3),
154 .BR tanh (3)