You are here : Cmath.htanh

tanh() - math.h

The C library function double tanh(double x) returns the hyperbolic tangent of x.


Syntax

double tanh(double x)


Example

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

int main ()
{
   double x, ret;
   x = 0.5;

   ret = tanh(x);
   printf("The hyperbolic tangent of %lf is %lf degrees", x, ret);
   
   return(0);
}


Output / Return Value

The hyperbolic tangent of 0.500000 is 0.462117 degrees


Limitations


Alternatives / See Also


Reference