Recommandation de cours :

Fonction tan() PHP

Définition et utilisation

La fonction tan() renvoie la tangente.

Syntaxextan(
) Description
x Obligatoire. Un nombre.

Description

La fonction tan() renvoie le paramètre x valeur tangente. x en radians

Exemple

Dans cet exemple, nous allons renvoyer la tangente de différents nombres :

<?php
echo(tan(M_PI_4));
echo(tan(0.50));
echo(tan(-0.50));
echo(tan(5));
echo(tan(10));
echo(tan(-5));
echo(tan(-10));
?>

Sortie :

1
0.546302489844
-0.546302489844
-3.38051500625
0.648360827459
3.38051500625
-0.648360827459