PHP tanh() Function
PHP Math Reference
Example
Return 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));
?>
Run example »
Definition and Usage
The tanh() function returns the hyperbolic tangent of a number, which is equal to sinh(x)/cosh(x).
Syntax
Parameter |
Description |
number |
Required. Specifies a number |
Technical Details
Return Value: |
The hyperbolic tangent of number |
Return Type: |
Float |
PHP Version: |
4.1+ |
PHP Math Reference
Color Picker