[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

cosh, coshf, or coshl Subroutine

Purpose

Computes the hyperbolic cosine.

Syntax

#include <math.h>

float coshf (x)
float x;

long double coshl (x)
long double x;

double cosh (x)
double x;

Description

The coshf, coshl, and cosh subroutines compute the hyperbolic cosine of the x parameter.

An application wishing to check for error situations should set errno to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these functions. On return, if errno is nonzero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is nonzero, an error has occurred.

Parameters

x Specifies the value to be computed.

Return Values

Upon successful completion, the coshf, coshl, and cosh subroutines return the hyperbolic cosine of x.

If the correct value would cause overflow, a range error occurs and the coshf, coshl, and cosh subroutines return the value of the macro HUGE_VALF, HUGE_VALL, and HUGE_VAL, respectively.

If x is NaN, a NaN is returned.

If x is ±0, the value 1.0 is returned.

If x is ±Inf, +Inf is returned.

Related Information

acosh, acoshf, or acoshl Subroutine, feclearexcept Subroutine, fetestexcept Subroutine, and class, _class, finite, isnan, or unordered Subroutines

sinh, sinhf, or sinhl Subroutine and tanh, tanhf, or tanhl Subroutine in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions Volume 2.

math.h in AIX 5L Version 5.2 Files Reference.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]