Manual Reference Pages  - tanh (3fortran)

NAME

TANH(3) - [MATHEMATICS:TRIGONOMETRIC] Hyperbolic tangent function

SYNOPSIS

result = tanh(x)

         elemental TYPE(kind=KIND) function tanh(x)

TYPE(kind=KIND),intent(in) :: x

CHARACTERISTICS

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.

DESCRIPTION

TANH(3) computes the hyperbolic tangent of X.

OPTIONS

o X : The value to compute the Hyperbolic tangent of.

RESULT

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.

EXAMPLES

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_tanh

Results:

      >   2.1000000000000001       0.97045193661345386

STANDARD

FORTRAN 77 , for a complex argument Fortran 2008

SEE ALSO

ATANH(3)

RESOURCES

o Wikipedia:hyperbolic functions
Fortran intrinsic descriptions


Nemo Release 3.1 tanh (3fortran) November 02, 2024
Generated by manServer 1.08 from 0639d479-18b3-4d4e-8de6-ac208fab6e8a using man macros.