C tanh () - Bibliothèque standard C

La fonction tanh () calcule la tangente hyperbolique d'un argument.

Prototype C tanh ()

 double tanh (double arg);

La fonction tanh () prend un seul argument et renvoie la valeur dans type double.

Il est défini dans le fichier d'en-tête ">.

 (Mathématiques) tanhx = tanh (x) (En programmation C)

Afin de trouver le tanh () du long double ou float, vous pouvez utiliser le prototype suivant.

long double tanhl (long double arg); float tanhf (float arg);

Gamme C tanh ()

Les arguments passés à la fonction tanh () peuvent être n'importe quel nombre, négatif ou positif.

Exemple: fonction C tanh ()

 #include #include #define PI 3.141592654 int main() ( double angle = 0.40, result; result = tanh(angle); printf("Tangent hyperbolic of %.2lf (in radians) = %.2lf", angle, result); return 0; )

Production

 Hyperbolique tangente de 0,40 (en radians) = 0,38

Articles intéressants...