Atan () -funktio laskee argumentin kaaren tangentin.
C atan () Prototyyppi
kaksinkertainen atan (kaksinkertainen x);
Funktio atan () ottaa yhden argumentin kaksinkertaiseksi ja palauttaa arvon radiaaneina.
Palautettu atan () -arvo on tyyppiä double
.
Atanin () ymmärtämiseksi paremmin:
(Matematiikka) tan-1x = atan (x) (C-ohjelmoinnissa)
Se määritetään otsikkotiedostossa.
C atan () -alue
Kirjastofunktio atan () ottaa minkä tahansa arvon negatiivisesta positiiviseksi.
Esimerkki: C atan () -funktio
#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; )
Tuotos
Käänteinen cos (1,00) = 0,79 radiaaneina Käänteinen cos (1,00) = 45 astetta