]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/atanh.3
Many pages: Fix style issues reported by `make lint-groff`
[thirdparty/man-pages.git] / man3 / atanh.3
CommitLineData
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
17atanh, atanhf, atanhl \- inverse hyperbolic tangent function
2af19291
AC
18.SH LIBRARY
19Math 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
31Feature 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 52These functions calculate the inverse hyperbolic tangent of
022671eb
MK
53.IR x ;
54that is the value whose hyperbolic tangent is
55.IR x .
47297adb 56.SH RETURN VALUE
138b47a9
MK
57On success, these functions return the inverse hyperbolic tangent of
58.IR x .
847e0d88 59.PP
138b47a9
MK
60If
61.I x
62is a NaN, a NaN is returned.
847e0d88 63.PP
138b47a9
MK
64If
65.I x
66is +0 (\-0), +0 (\-0) is returned.
847e0d88 67.PP
138b47a9
MK
68If
69.I x
70is +1 or \-1,
efe294cb 71a pole error occurs,
138b47a9
MK
72and the functions return
73.BR HUGE_VAL ,
74.BR HUGE_VALF ,
75or
76.BR HUGE_VALL ,
77respectively, with the mathematically correct sign.
847e0d88 78.PP
138b47a9
MK
79If the absolute value of
80.I x
81is greater than 1,
efe294cb 82a domain error occurs,
138b47a9
MK
83and 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
88See
89.BR math_error (7)
90for information on how to determine whether an error has occurred
91when calling these functions.
92.PP
93The following errors can occur:
fea681da 94.TP
138b47a9
MK
95Domain error: \fIx\fP less than \-1 or greater than +1
96.I errno
97is set to
98.BR EDOM .
99An invalid floating-point exception
100.RB ( FE_INVALID )
101is raised.
102.TP
103Pole error: \fIx\fP is +1 or \-1
104.I errno
105is set to
1ae6b2c7 106.B ERANGE
138b47a9 107(but see BUGS).
138b47a9
MK
108A divide-by-zero floating-point exception
109.RB ( FE_DIVBYZERO )
110is raised.
2ea0152c
MS
111.SH ATTRIBUTES
112For 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
117allbox;
c466875e 118lbx lb lb
2ea0152c
MS
119l l l.
120Interface Attribute Value
121T{
122.BR atanh (),
123.BR atanhf (),
124.BR atanhl ()
125T} Thread safety MT-Safe
126.TE
c466875e
MK
127.hy
128.ad
129.sp 1
47297adb 130.SH CONFORMING TO
9a74e018 131C99, POSIX.1-2001, POSIX.1-2008.
847e0d88 132.PP
138b47a9
MK
133The variant returning
134.I double
135also conforms to
7cada58c 136SVr4, 4.3BSD.
138b47a9 137.SH BUGS
1f6982a0
MK
138In 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 141when a pole error occurs,
138b47a9 142.I errno
444cf9b1 143is set to
1ae6b2c7 144.B EDOM
1f6982a0 145instead of the POSIX-mandated
138b47a9 146.BR ERANGE .
1f6982a0 147Since 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)