PHP tanh() Function
Example
Return the hyperbolic tangent of different numbers:
"); echo(tanh(0.50) . ""); echo(tanh(-0.50) . "
"); echo(tanh(5) . "
"); echo(tanh(10) . "
"); echo(tanh(-5) . "
"); echo(tanh(-10)); ?>
Run Example »
Definition and Usage
The tanh() function returns the hyperbolic tangent of a number, defined as sinh(x)/cosh(x).
Syntax
tanh(
number
);
| Parameters | Description |
|---|---|
| number | Required. Specifies a number. |
Technical Details
| Return Value: | number The hyperbolic tangent of. |
|---|---|
| Return Type: | Float |
| PHP Version: | 4.1+ |
PHP Math Reference Manual