C atanh () - C Standard Library

Spisie treści

Funkcja atanh () zwraca łukową styczną hiperboliczną (odwrotną styczną hiperboliczną) liczby w radianach.

atanh()Funkcja przyjmuje jeden argument (-1 ≦ x ≧ 1) i powraca tangens hiperboliczny łuk w radianach.

atanh()Funkcja jest zawarty w pliku nagłówka.

atanh () Prototyp

 podwójne atanh (podwójne x);

Aby znaleźć arc tangens hiperboliczny typu int, floatlub long doublemożna jawnie przekonwertować typ do doublekorzystania z operatorem plastikowymi.

int x = 0; podwójny wynik; wynik = atanh (double (x));

Ponadto dwie funkcje atanhf () i atanhl () zostały wprowadzone w C99 specjalnie do pracy z typem floati long doubleodpowiednio.

float atanhf (float x); długi podwójny atanhl (długi podwójny x);

atanh () Parametr

atanh()Funkcja przyjmuje jeden Greater argumentu niż lub równą 1 i mniejszą niż lub równą 1.

Parametr Opis
podwójna wartość Wymagany. Podwójna wartość większa lub równa 1 (-1 ≦ x ≧ 1).

Przykład 1: funkcja atanh () z różnymi parametrami

 #include #include int main() ( // constant PI is defined const double PI = 3.1415926; double x, result; x = -0.5; result = atanh(x); printf("atanh(%.2f) = %.2lf in radians", x, result); // converting radians to degree result = atanh(x)*180/PI; printf("atanh(%.2f) = %.2lf in degrees", x, result); // parameter not in range x = 3; result = atanh(x); printf("atanh(%.2f) = %.2lf", x, result); return 0; ) 

Wynik

 atanh (-0,50) = -0,55 w radianach atanh (-0,50) = -31,47 w stopniach atanh (3,00) = nan 

Interesujące artykuły...