
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo C - <b>sinh() calculate hyperbolic sine</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
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);
}
See Also: asin() cos() cosh() matherr() sin() tan()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson