PHP - tanh
Trieda
Metóda - tanh
(PHP 4 >= 4.1.0, PHP 5, PHP 7)
The tanh() function returns a value of the goniometric
hyperbolic tangent function defined as sinh(angle) / cosh(angle).
The function works the same as the tangent function, but it returns values on
the unit hyperbola instead of the unit circle.
Procedurálne
- function tanh (float $arg) : float
Parametre
| Názov | Dátový typ | Predvolená hodnota | Popis |
|---|---|---|---|
| $arg | float | The angle in radians. |
Mávratovej hodnoty
Vracia: float
The hyperbolic tangent of the given angle, returned as a float.
Príklady
<?php
for ($i = 0; $i <= 180; $i += 15) {
echo "tanh(" . $i . "°) = " . tanh(deg2rad($i)) . "<br />";
}
