C examples for math.h:tanh
function
<cmath> <ctgmath> <math.h>
Returns the hyperbolic tangent of x.
long double tanhl (long double x); long double tanh (long double x); float tanhf (float x); double tanh (double x); float tanh (float x); double tanh (T x);
Parameter | Description |
---|---|
x | Value representing a hyperbolic angle. |
Hyperbolic tangent of x.
#include <stdio.h> #include <math.h> int main ()/* w w w . ja v a 2 s .c om*/ { double param = log(2.0); double result = tanh (param); printf ("The hyperbolic tangent of %f is %f.\n", param, result); return 0; }