Standards / Extensions | C or C++ | Dependencies |
---|---|---|
ISO C |
both |
#include <math.h>
double sinh(double x);
float sinh(float x); /* C++ only */
long double sinh(long double x); /* C++ only */
float sinhf(float x);
long double sinhl(long double x);
If successful, the function returns the calculated value.
Otherwise, if the result is too large, the function sets errno to ERANGE and returns ±HUGE_VAL, depending on the value of x. If the value underflows, the function returns 0 and sets errno to ERANGE.
Special behavior for IEEE:If successful, the function returns the hyperbolic sine of x with x expressed in radians.
If the result would overflow, the function returns ±HUGE_VAL, according to the value of x, and sets errno to ERANGE. No other errors can occur.
⁄* CELEBS28
This example computes y as the hyperbolic sine of &pi.&slr.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);
}
sinh( 1.570796 ) = 2.301299