Manual Reference Pages  - sinh (3fortran)

NAME

SINH(3) - [MATHEMATICS:TRIGONOMETRIC] Hyperbolic sine function

SYNOPSIS

result = sinh(x)

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

TYPE(kind=KIND) :: x

CHARACTERISTICS

o TYPE may be real or complex
o KIND may be any kind supported by the associated type.
o The returned value will be of the same type and kind as the argument.

DESCRIPTION

SINH(3) computes the hyperbolic sine of X.

The hyperbolic sine of x is defined mathematically as:

         sinh(x) = (exp(x) - exp(-x)) / 2.0

OPTIONS

o X : The value to calculate the hyperbolic sine of

RESULT

The result has a value equal to a processor-dependent approximation to sinh(X). If X is of type complex its imaginary part is regarded as a value in radians.

EXAMPLES

Sample program:

    program demo_sinh
    use, intrinsic :: iso_fortran_env, only : real32, real64, real128
    implicit none
    real(kind=real64) :: x = - 1.0_real64
    real(kind=real64) :: nan, inf
    character(len=20) :: line

! basics print *, sinh(x) print *, (exp(x)-exp(-x))/2.0

! sinh(3) is elemental and can handle an array print *, sinh([x,2.0*x,x/3.0])

! a NaN input returns NaN line=’NAN’ read(line,*) nan print *, sinh(nan)

! a Inf input returns Inf line=’Infinity’ read(line,*) inf print *, sinh(inf)

! an overflow returns Inf x=huge(0.0d0) print *, sinh(x)

end program demo_sinh

Results:

     > -1.1752011936438014
     > -1.1752011936438014
     > -1.1752011936438014       -3.6268604078470190      -0.33954055725615012
     >                      NaN
     >                 Infinity
     >                 Infinity

STANDARD

Fortran 95 , for a complex argument Fortran 2008

SEE ALSO

ASINH(3)

RESOURCES

o Wikipedia:hyperbolic functions
Fortran intrinsic descriptions (license: MIT) @urbanjost


Nemo Release 3.1 sinh (3fortran) November 02, 2024
Generated by manServer 1.08 from 4426a2a6-ab72-4410-888a-a1813309d044 using man macros.