C cosh () - C standarta bibliotēka

Funkcija cosh () aprēķina skaitļa hiperbolisko kosinusu.

cosh () Funkcijas prototips

 dubultā cosh (dubultā x)

Funkcija cosh () aizņem vienu argumentu (leņķis radiānos) un atgriež šī leņķa hiperbolisko kosinusu kā tipu double.

Funkcija cosh () ir definēta galvenes failā "> math.h galvenes failā.

Lai atrastu garo dubulto vai peldošo skaitļu cosh (), varat izmantot šādu prototipu.

garš dubultais coshl (garš dubultais arg); pludiņš coshf (pludiņš arg);

Piemērs: C cosh ()

 #include #include int main () ( double x, result; x = 0.5; result = cosh(x); printf("Hyperbolic cosine of %lf (in radians) = %lf", x, result); x = -0.5; result = cosh(x); printf("Hyperbolic cosine of %lf (in radians) = %lf", x, result); x = 0; result = cosh(x); printf("Hyperbolic cosine of %lf (in radians) = %lf", x, result); x = 1.5; result = cosh(x); printf("Hyperbolic cosine of %lf (in radians) = %lf", x, result); return 0; )

Rezultāts

 Hiperboliskais kosinuss 0,500000 (radiānos) = 1,127626 Hiperboliskais kosinuss -0,500000 (radiānos) = 1,127626 Hiperboliskais kosinuss 0,000000 (radiānos) = 1,000000 Hiperboliskais kosinuss 1,500000 (radiānos) = 2,352410

Interesanti raksti...