PHP tanh() function
Complete PHP Math Reference
Definition and Usage
The tanh() function returns the hyperbolic tangent of an angle
(equivalent to sinh(x) / cosh(x)).
Syntax
Parameter |
Description |
x |
Required. A number |
Example
In this example we will get the hyperbolic tangent of different numbers:
<?php
echo(tanh(M_PI_4) . "<br />");
echo(tanh(0.50) . "<br />");
echo(tanh(-0.50) . "<br />");
echo(tanh(5) . "<br />");
echo(tanh(10) . "<br />");
echo(tanh(-5) . "<br />");
echo(tanh(-10))
?>
|
The output of the code above will be:
0.655794202633
0.46211715726
-0.46211715726
0.999909204263
0.999999995878
-0.999909204263
-0.999999995878
|
Complete PHP Math Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|