sinh() — Calculate Hyperbolic Sine
Format
#include <math.h>
double sinh(double x);
Language Level
ANSI
Threadsafe
Yes
Description
The sinh()
function
calculates the hyperbolic sine of x, with x expressed
in radians.
Return Value
The sinh()
function
returns the value of the hyperbolic sine of x.
If the result is too large, the sinh()
function
sets errno to ERANGE and returns the value HUGE_VAL (positive
or negative, depending on the value of x).
Example
This example computes y as
the hyperbolic sine of π⁄2.
#include <math.h>
#include <stdio.h>
int main(void)
{
double pi, x, y;
pi = 3.1415926535;
x = pi/2;
y = sinh(x);
printf("sinh( %lf ) = %lf\n", x, y);
}
/********************* Output should be similar to: *************
sinh( 1.570796 ) = 2.301299
*/