Debian Codegraph @

doc/src/intrinsics/mathematical/atanh.md

raw
1 # atanh(x): Inverse Hyperbolic Tangent
2
3 Inverse hyperbolic tangent function.
4
5 ## Declaration
6
7 ### Syntax
8
9 ```fortran
10 retval = atanh(x)
11 elemental real(p) function atanh(x)
12 elemental complex(p) function atanh(x)
13 ```
14 ### Arguments
15
16 `x` the input value, can be real with value greater than or equal to 1 or of
17 type complex.
18
19 ### Return values
20
21 The returned value has the kind of the input value and TYPE may be real
22 or complex.
23
24 ## Description
25
26 **atanh(x)** computes the inverse hyperbolic tangent function of **x**.
27
28 The result type and kind are the same as input value `x`.
29
30 If the result is complex, the imaginary part is expressed in radians and lies
31 in the range
32
33 $\frac{-\pi}{2} <= aimag (atanh(x)) <= \frac{\pi}{2}$
34
35 If the result is real, it lies in the range
36
37 $-1.0 < atanh(x) < 1.0$
38
39 ## Types
40
41 Supported argument types float, double, complex float, complex double.
42
43 ```fortran
44 interface atanh
45 module procedure satanh, datanh, catanh, zatanh
46 end interface
47
48 contains
49
50 interface
51 elemental real(sp) function satanh(x)
52 real(sp), intent(in) :: x
53 end function
54
55 elemental real(dp) function datanh(x)
56 real(dp), intent(in) :: x
57 end function
58
59 elemental complex(sp) function catanh(x)
60 complex(sp), intent(in) :: x
61 end function
62
63 elemental complex(dp) function zatanh(x)
64 complex(dp), intent(in) :: x
65 end function
66 end interface
67 ```
68 ## Examples
69
70 ```fortran
71 program intrinsics_atanh
72 implicit none
73 print *, atanh(0.0)
74 end program
75 ```
76
77 **Result**:
78
79 ```
80 0.0
81 ```
82 ## See Also
83
84 [asinh](asinh.md), [acosh](acosh.md).