C cosh () - C Štandardná knižnica

Funkcia cosh () počíta hyperbolický kosínus čísla.

cosh () Funkcia Prototyp

 double cosh (double x)

Funkcia cosh () vezme jediný argument (uhol v radiánoch) a vráti hyperbolický kosínus tohto uhla ako typ double.

Funkcia cosh () je definovaná v hlavičkovom súbore "> math.h.

Na nájdenie cosh () dlhých dvojitých alebo floatových čísel môžete použiť nasledujúci prototyp.

dlhý dvojitý coshl (dlhý dvojitý arg); float coshf (float arg);

Príklad: 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; )

Výkon

 Hyperbolický kosínus s veľkosťou 0,500000 (v radiánoch) = 1,127626 Hyperbolický kosínus s hodnotou -0,500000 (v radiánoch) = 1,127626 Hyperbolický kosínus s hodnotou 0,000000 (v radiánoch) = 1,000000 Hyperbolický kosínus s hodnotou 1,500000 (v radiánoch) = 2,352410

Zaujímavé články...