C cosh () - C Standard Library

De functie cosh () berekent de cosinus hyperbolicus van een getal.

cosh () Functieprototype

 dubbele cosh (dubbele x)

De functie cosh () accepteert één argument (hoek in radialen) en retourneert de hyperbolische cosinus van die hoek als type double.

De cosh () functie is gedefinieerd in header-bestand "> math.h header-bestand.

Om de cosh () van lange dubbele of zwevende getallen te vinden, kunt u het volgende prototype gebruiken.

lange dubbele coshl (lange dubbele arg); float coshf (float arg);

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

Uitvoer

 Hyperbolische cosinus van 0,500000 (in radialen) = 1,127626 Hyperbolische cosinus van -0,500000 (in radialen) = 1,127626 Hyperbolische cosinus van 0,000000 (in radialen) = 1,000000 Hyperbolische cosinus van 1,500000 (in radialen) = 2,352410

Interessante artikelen...