sinh(3M)


sinh -- return hyperbolic sine of argument

Synopsis

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

#include <math.h>

double sinh(double x);

float sinhf(float x);

double cosh(double x);

float coshf(float x);

double tanh(double x);

float tanhf(float x);

double asinh(double x);

double acosh(double x);

double atanh(double x);

Description

sinhf- return single-precision hyperbolic sine of argument

cosh- return hyperbolic cosine of argument

coshf- return single-precision hyperbolic cosine of argument

tanh- return hyperbolic tangent of argument

tanhf- return single-precision hyperbolic tangent of argument

asinh- return inverse hyperbolic sine of argument

acosh- return inverse hyperbolic cosine of argument

atanh- return inverse hyperbolic tangent of argument

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

asinh, acosh, and atanh return, respectively, the inverse hyperbolic sine, cosine, and tangent of their argument.

Errors

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

When x is less than 1, acosh returns IEEE NaN on systems that support it and raises the invalid operation exception. Otherwise, it returns zero. In either case it sets errno to EDOM.

If |x| > 1, atanh returns IEEE NaN on systems that support it and raises the invalid operation exception. Otherwise, it returns zero. In either case it sets errno to EDOM.

If |x| == 1, atanh returns IEEE NaN on systems that support it. Otherwise, it returns zero. In either case it sets errno to ERANGE.

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, 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)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.