C atan () - biblioteka standardowa języka C.

Funkcja atan () oblicza styczną łuku argumentu.

C atan () Prototype

 podwójny atan (podwójne x);

Funkcja atan () przyjmuje pojedynczy argument jako podwójną i zwraca wartość w radianach.

Zwrócona wartość atan () jest typu double.

Aby lepiej zrozumieć atan ():

 (Matematyka) tan-1x = atan (x) (W programowaniu w C) 

Jest zdefiniowany w pliku nagłówkowym.

Zakres C atan ()

Funkcja biblioteczna atan () przyjmuje dowolną wartość od ujemnej do dodatniej.

Przykład: funkcja C atan ()

 #include #include #define PI 3.141592654 int main() ( double num = 1.0; double result; result = atan(num); printf("Inverse of tan(%.2f) = %.2f in radians", num, result); // Converting radians to degrees result = (result * 180) / PI; printf("Inverse of tan(%.2f) = %.2f in degrees", num, result); return 0; )

Wynik

 Odwrotność cos (1,00) = 0,79 w radianach Odwrotność cos (1,00) = 45 w stopniach

Interesujące artykuły...