C cosh () - C Standard Library

Funkcja cosh () oblicza cosinus hiperboliczny liczby.

Prototyp funkcji cosh ()

 podwójne cosh (podwójne x)

Funkcja cosh () przyjmuje pojedynczy argument (kąt w radianach) i zwraca hiperboliczny cosinus dla tego kąta jako typ double.

Funkcja cosh () jest zdefiniowana w pliku nagłówkowym "> math.h plik nagłówkowy.

Aby znaleźć cosh () długich liczb podwójnych lub zmiennoprzecinkowych, możesz użyć następującego prototypu.

długi podwójny coshl (długi podwójny arg); float coshf (float arg);

Przykład: 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; )

Wynik

 Cosinus hiperboliczny z 0,500000 (w radianach) = 1,127626 Cosinus hiperboliczny z -0,500000 (w radianach) = 1,127626 Cosinus hiperboliczny z 0,000000 (w radianach) = 1,000000 Cosinus hiperboliczny z 1,500000 (w radianach) = 2,352410

Interesujące artykuły...