C atan () - C Standardbibliotek

Funktionen atan () beräknar ett arguments bågtangens.

C atan () Prototyp

 dubbel atan (dubbel x);

Funktionen atan () tar ett enda argument som en dubbel och returnerar värdet i radianer.

Det returnerade värdet av atan () är av typen double.

För bättre förståelse av atan ():

 (Matematik) tan-1x = atan (x) (I C-programmering) 

Det definieras i rubrikfilen.

C atan () intervall

Biblioteksfunktionen atan () tar något värde från negativ till positiv.

Exempel: C atan () -funktion

 #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; )

Produktion

 Omvänd av cos (1,00) = 0,79 i radianer Omvänd av cos (1,00) = 45 i grader

Intressanta artiklar...