[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 2

sinh, sinhl, cosh, coshl, tanh, or tanhl Subroutine


Computes hyperbolic functions.


IEEE Math Library (libm.a)

or System V Math Library (libmsaa.a)


#include <math.h>
double sinh (x)
double x;
double cosh (x)
double x;
double tanh (x)
double x;
long double sinhl (x)
double x;
long double coshl (x)
double x;
long double tanhl (x)
double x;


The sinh, cosh, and tanh subroutines compute the hyperbolic trigonometric functions of their parameters. The sinhl, coshl, and tanhl subroutines compute these functions for parameters expressed in the long double data type.

Note: Compile any routine that uses subroutines from the libm.a library with the -lm flag. To compile the tanh.c file, for example, enter:
cc tanh.c -lm


x Specifies a double-precision floating-point value.

Error Codes

If the correct value overflows, the sinh, sinhl, cosh, and coshl subroutines return a correctly signed HUGE_VAL, and the errno global variable is set to ERANGE.

These error-handling procedures should be changed with the matherr subroutine when the libmsaa.a (-lmsaa) library is used.

Implementation Specifics

These subroutines are part of Base Operating System (BOS) Runtime.

Related Information

The matherr subroutine, sin, cos, tan, asin, acos, atan, or atan2 subroutine.

Subroutines Overview in AIX Version 4.3 General Programming Concepts: Writing Programs.

128-Bit long double Floating-Point Format in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.

[ Previous | Next | Contents | Glossary | Home | Search ]