[Previous]
[Contents]
[Next]

tanh()

calculate the hyperbolic tangent

Synopsis:

#include <math.h>
double tanh( double x );

Description:

The tanh() function computes the hyperbolic tangent of x.

When the x argument is large, partial or total loss of significance may occur. The matherr() function is invoked in this case.

Returns:

The hyperbolic tangent value. When an error has occurred, errno indicates the type of error detected.

Examples:

#include <stdio.h>
#include <math.h>

void main()
  {
    printf( "%f\n", tanh(.5) );
  }

produces the output:

0.462117

Classification:

ANSI

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

cosh(), errno, sinh(), matherr()


[Previous]
[Contents]
[Next]