DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

sinh(3M)


sinh, cosh, tanh, asinh, acosh, atanh -- return hyperbolic and inverse hyperbolic sine, cosine and tangent of argument

Synopsis

   cc [flag . . .] file . . .  -lm [library . . .]
   

#include <math.h>

double sinh(double x);

float sinhf(float x);

long double sinhl(long double x);

double cosh(double x);

float coshf(float x);

long double coshl(long double x);

double tanh(double x);

float tanhf(float x);

long double tanhl(long double x);

double asinh(double x);

float asinhf(float x);

long double asinhl(long double x);

double acosh(double x);

float acoshf(float x);

long double acoshl(long double x);

double atanh(double x);

float atanhf(float x);

long double atanhl(long double x);

Description

sinh, cosh, tanh the single-precision versions sinhf, coshf, tanhf and the long double-precision versions sinhl, coshl and tanhl return, respectively, the hyperbolic sine, cosine, and tangent of their argument.

asinh, acosh, atanh the single-precision versions asinhf, acoshf, atanhf and the long double-precision versions asinhl, acoshl and atanhl return, respectively, the inverse hyperbolic sine, cosine, and tangent of their argument.

Errors

sinh, sinhf, sinhl, cosh, coshf and coshl return a value that compares equal to +HUGE_VAL, +HUGE_VALF or +HUGE_VALL (respectively) (and sinh, sinhf and sinhl return a value that compares equal to -HUGE_VAL, -HUGE_VALF or -HUGE_VALL for negative x) when the correct value would overflow and set errno to ERANGE.

When x is less than 1, acosh, acoshf and acoshl return IEEE NaN on systems that support it and raise the invalid operation exception. Otherwise, they return zero. In either case errno is set to EDOM.

If |x| > 1, atanh, atanhf and atanhl return IEEE NaN on systems that support it and raise the invalid operation exception. Otherwise, they return zero. In either case errno is set to EDOM.

If x is equal to +1 or -1, atanh, atanhf and atanhl return ±HUGE_VAL, ±HUGE_VALF or ±HUGE_VALL, raise the divide-by-zero exception and errno is set to ERANGE. If the program was compiled with the -Xt compilation mode, atanh, atanhf and atanhl return IEEE NaN on systems that support it and raise the invalid operation exception. Otherwise, they return zero. In either case errno is set to EDOM.

On systems that support IEEE NaN, if the argument to any of these functions is a quiet NaN, that value is returned. If the argument is a signaling NaN, a quiet NaN is returned and the invalid operation exception is raised. In either case, errno is set to EDOM.

If the program was compiled with the -Xt compilation mode, a value that will compare equal to HUGE is returned instead of HUGE_VAL.

In addition, for atanh, atanhf and atanhl a message indicating SING error is printed on the standard error output.

These error handling procedures may be changed with the function matherr.

References

cc(1), matherr(3M)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004