Rate This Document
Findability
Accuracy
Completeness
Readability

sinh

Compute the hyperbolic sine value of a real number.

Interface Definition

C interface:

float sinhf(float x);

double sinh(double x);

Fortran interface:

RES = SINHF(X);

RES = SINH(X);

Parameters

Parameter

Type

Description

Input/Output

x

  • For sinhf, x is of single-precision floating-point type.
  • For sinh, x is of double-precision floating-point type.

Floating-point value of a radian angle

Input

Return Value

  • Return the hyperbolic sine function value y of the radian angle x.
  • If the input is +0, the return value is +0.
  • If the input is -0, the return value is -0.
  • If the input value of sinhf is greater than 0x1.8p6f, +∞ is returned. If the input value of sinh is greater than 0x1.8p9, +∞ is returned.
  • If the input value of sinhf is less than -0x1.8p6f, –∞ is returned. If the input value of sinh is less than -0x1.8p9, –∞ is returned.
  • If the input is ±∞, the return value is ±∞.
  • If the input is NaN, the return value is NaN.

Dependencies

C: "km.h"

Fortran: "km.f03"

Examples

C interface:

    double pi = acos(-1); 
    // typical usage 
    double a = pi/6, b = 1.0, c = -3*pi/4, d = pi/3; 
    // special handling 
    double e = INFINITY, f = -INFINITY, g = NAN; 
    // print result 
    printf("sinh(pi/6) = %.15f\n", sinh(a)); 
    printf("sinh(1.0) = %.15f\n", sinh(b)); 
    printf("sinh(-3*pi/4) = %.15f\n", sinh(c)); 
    printf("sinh(pi/3) = %.15f\n", sinh(d)); 
    printf("sinh(INFINITY) = %.15f\n", sinh(e)); 
    printf("sinh(-INFINITY) = %.15f\n", sinh(f)); 
    printf("sinh(NAN) = %.15f\n", sinh(g)); 
    /* 
     *  sinh(pi/6) = 0.547853473888040 
     *  sinh(1.0) = 1.175201193643801 
     *  sinh(-3*pi/4) = -5.227971924677803 
     *  sinh(pi/3) = 1.249367050523975 
     *  sinh(INFINITY) = inf
     *  sinh(-INFINITY) = -inf 
     *  sinh(NAN) = nan 
     * 
     * */

Fortran interface:

    REAL(8) :: X = 1.0 
    PRINT*,  SINH(X) 
    ! 
    ! OUTPUT 
    !     1.175201193643801
    !