PHP tanh()Fonction
Manuel de référence mathématique PHP
Exemples
Renvoie la tangente hyperbolique de différents nombres :
<?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));
?>
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));
?>
Exécuter l'exemple »
Définition et utilisation
La fonction tanh() retourne la tangente hyperbolique d'un nombre, définie comme sinh(x)/cosh(x).
Syntaxe
tanh(number);
| Parameters | Description |
|---|---|
| nombre | Requis. Spécifie un nombre. |
Détails techniques
| Valeur de retour : | numberLa tangente hyperbolique de. |
|---|---|
| Type de retour : | Float |
| Version de PHP : | 4.1+ |
Manuel de référence des mathématiques PHP Autres extensions