TANH(3) - [MATHEMATICS:TRIGONOMETRIC] Hyperbolic tangent function
result = tanh(x)
elemental TYPE(kind=KIND) function tanh(x)TYPE(kind=KIND),intent(in) :: x
o X may be real or complex and any associated kind supported by the processor. o The returned value will be of the same type and kind as the argument.
TANH(3) computes the hyperbolic tangent of X.
o X : The value to compute the Hyperbolic tangent of.
Returns the hyperbolic tangent of X.
If X is complex, the imaginary part of the result is regarded as a radian value.
If X is real, the return value lies in the range
-1 <= tanh(x) <= 1.
Sample program:
program demo_tanh use, intrinsic :: iso_fortran_env, only : real32, real64, real128 implicit none real(kind=real64) :: x = 2.1_real64 write(*,*)x, tanh(x) end program demo_tanhResults:
> 2.1000000000000001 0.97045193661345386
FORTRAN 77 , for a complex argument Fortran 2008
ATANH(3)
Fortran intrinsic descriptions
o Wikipedia:hyperbolic functions
Nemo Release 3.1 | tanh (3fortran) | November 02, 2024 |