C cosh () - C Standardbibliotek

Funktionen cosh () beregner den hyperbolske cosinus af et tal.

cosh () Funktion Prototype

 dobbelt cosh (dobbelt x)

Funktionen cosh () tager et enkelt argument (vinkel i radianer) og returnerer den hyperbolske cosinus af den vinkel som type double.

Funktionen cosh () er defineret i header-fil "> math.h header-fil.

For at finde cosh () af lange dobbelt- eller float-tal kan du bruge følgende prototype.

lang dobbelt coshl (lang dobbelt arg); float coshf (float arg);

Eksempel: 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; )

Produktion

 Hyperbolsk cosinus på 0.500.000 (i radianer) = 1.127626 Hyperbolisk cosinus på -0.500.000 (i radianer) = 1.127626 Hyperbolisk cosinus på 0.000000 (i radianer) = 1.000000 Hyperbolsk cosinus på 1.500.000 (i radianer) = 2.352410

Interessante artikler...