tanh

Computes the hyperbolic tangent of the specified argument

Local Servers:nonblocking
Remote Servers:N/A
Classification:ANSI
Service:Mathematical Computation

Syntax

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

Parameters

x
(IN) Specifies the argument whose hyperbolic tangent is to be computed.

Return Values

The tanh function returns the hyperbolic tangent value. When an error has occurred, errno is set.

Remarks

The tanh function computes the hyperbolic tangent of x.

When the x argument is large, partial or total loss of significance can occur. The matherr function is called in this case.

See Also

cosh, sinh, matherr

Example

  #include <math.h>  
  #include <stdio.h>  
   
  main ()  
  {  
     printf ("%f\n", tanh (.5) );  
  }
  

produces the following:

  0.462117