[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Base Operating System and Extensions Technical Reference, Volume 2

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

Purpose

Computes hyperbolic functions.

Libraries

IEEE Math Library (libm.a)

or System V Math Library (libmsaa.a)

Syntax

#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;

Description

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

Parameters

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.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]