sinh
Compute the hyperbolic sine of the input radian.
Interface Definition
C interface:
float sinhf(float x);
double sinh(double x);
long double sinhl(long double x);
Fortran interface:
RES = SINHF(X);
RES = SINH(X);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
x |
|
Floating-point value of a radian angle. |
Input |
Return Value
- The hyperbolic sine y of the radian angle x is returned.
- If the input is ±0, the return value is ±0.
- If the input of sinhf is greater than or equal to 0x1.8p6 (96), the return value is +∞. If the input of sinh is greater than or equal to 0x1.8p9 (768), the return value is +∞.
- If the input of sinhf is smaller than or equal to -0x1.8p6 (-96), the return value is -∞. If the input of sinh is smaller than or equal to -0x1.8p9 (-768), the return value is -∞.
- If the input of sinhf is smaller than 0x1p-13, the return value is x. If the input of sinh is smaller than 0x1p-26, the return value is x.
- If the input is ±∞, the return value is ±∞.
- If the input is NaN, the return value is NaN.
Dependency
C: "km.h"
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
!
Parent topic: Hyperbolic Functions