Funksjonen cosh () beregner den hyperbolske cosinus av et tall.
cosh () Funksjon Prototype
dobbel cosh (dobbel x)
Funksjonen cosh () tar et enkelt argument (vinkel i radianer) og returnerer den hyperbolske cosinus av den vinkelen som type double
.
Cosh () -funksjonen er definert i topptekstfilen "> matematikk.h-topptekstfilen.
For å finne cosh () av lange doble eller float tall, kan du bruke følgende prototype.
lang dobbel coshl (lang dobbel 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; )
Produksjon
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