C tanh () - C Standard Library

De functie tanh () berekent de tangens hyperbolicus van een argument.

C tanh () Prototype

 dubbele tanh (dubbele arg);

De functie tanh () accepteert één argument en retourneert de waarde in type double.

Het wordt gedefinieerd in "> header-bestand.

 (Wiskunde) tanhx = tanh (x) (In C-programmering)

Om de tanh () van long double of float te vinden, kun je het volgende prototype gebruiken.

lange dubbele tanhl (lange dubbele arg); float tanhf (float arg);

C tanh () bereik

De argumenten die aan de functie tanh () worden doorgegeven, kunnen elk getal zijn, negatief of positief.

Voorbeeld: functie 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; )

Uitvoer

 Raaklijn hyperbolisch van 0,40 (in radialen) = 0,38

Interessante artikelen...