sinh() Calculate Hyperbolic Sine
#include <math.h>
double sinh(x); Hyperbolic sine
double x; Angle, in radians
sinh() return the hyperbolic sine of 'x' radians.
Returns: Hyperbolic sine of 'x'. If the result is too large,
matherr() is called with an OVERFLOW error, 'errno'
(defined in <stdlib.h>) is set to ERANGE (defined in
<math.h>), and the value 'HUGE" (defined in <math.h>) is
returned.
Notes: Error handling can be modified by using the matherr()
function.
OVERFLOW first occurs with 'x' greater than 7.0E2
-------------------------------- Example ---------------------------------
The following statements print the hyperbolic sine of pi/2 and 220 pi
radians, and check for overflow.
#include <math.h> /* for sinh() and ERANGE */
#include <stdio.h> /* for printf() */
#include <stdlib.h> /* for errno */
main()
{
double hsine, pi = 3.1415926535;
hsine = sinh(pi/2.0);
printf("hyperbolic sine of pi/2 = %e\n", hsine);
errno = 0;
hsine = sinh(220.0 * pi);
if (errno == ERANGE)
printf("ERANGE error in sinh()\n");
printf("hyperbolic sine of 220 * pi = %e\n", hsine);
}
Seealso:
This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster