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

Technical Reference: Base Operating System and Extensions, Volume 2

tanh, tanhf, or tanhl Subroutine

Purpose

Computes the hyperbolic tangent.

Syntax

#include <math.h>

float tanhf (x)
float x;

long double tanhl (x)
double x;

double tanh (x)
double x;

Description

The tanhf, tanhl, and tanh subroutines compute the hyperbolic tangent of the x .

An application wishing to check for error situations should set the errno global variable to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these subroutines. Upon 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 tanhf, tanhl, and tanh subroutines return the hyperbolic tangent of x.

If x is NaN, a NaN is returned.

If x is ±0, x is returned.

If x is ±Inf, ±1 is returned.

If x is subnormal, a range error may occur and x should be returned.

Related Information

The sin, sinf, or sinl Subroutine.

atanf or atanl Subroutine, feclearexcept Subroutine, fetestexcept Subroutine, and class, _class, finite, isnan, or unordered Subroutines in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions Volume 1.

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

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