C tanh () - C Standardbibliotek

Funktionen tanh () beräknar den hyperboliska tangenten för ett argument.

C tanh () Prototyp

 dubbel tanh (dubbel arg);

Funktionen tanh () tar ett enda argument och returnerar värdet i typ double.

Det definieras i rubrikfilen ">.

 (Matematik) tanhx = tanh (x) (I C-programmering)

För att hitta tanh () för long double eller float kan du använda följande prototyp.

lång dubbel tanhl (lång dubbel arg); float tanhf (float arg);

C tanh () intervall

Argumenten som skickas till funktionen tanh () kan vara valfritt tal, antingen negativt eller positivt.

Exempel: C tanh () -funktion

 #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; )

Produktion

 Tangenthyperbol av 0,40 (i radianer) = 0,38

Intressanta artiklar...