NOVINKA: Najžiadanejšie rekvalifikačné kurzy teraz s 50% zľavou + kurz AI ZADARMO. Nečakaj, táto ponuka dlho nevydrží! Zisti viac:

PHP - tanh

Trieda

Koreň \ Bez triedy

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ázovDátový typPredvolená hodnotaPopis
$argfloat

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 />";
}

Súvisiace manuály

      • function atanh (float $arg) : float
      • function cosh (float $arg) : float
      • function sinh (float $arg) : float
      • function tan (float $arg) : float
      Aktivity