Latest web development tutorials

C-Bibliotheksfunktionen - atan ()

C Standard-Bibliothek - <math.h> C Standard - Bibliothek - <math.h>

Beschreibung

C - BibliotheksfunktionenDoppel atan (double x) Gibt in Radiant der Arcustangens von x.

Erklärung

Hier ist () Anweisung Atan-Funktion.

double atan(double x)

Parameter

  • x - Fließkommawert.

Rückgabewert

Diese Funktion gibt in Radiant den Arcustangens von x, ausgedrückt in Radiant Intervall [-pi / 2, + pi / 2].

Beispiele

Das folgende Beispiel zeigt die atan () Funktion verwendet wird.

#include <stdio.h>
#include <math.h>

#define PI 3.14159265

int main ()
{
   double x, ret, val;
   x = 1.0;
   val = 180.0 / PI;

   ret = atan (x) * val;
   printf("%lf 的反正切是 %lf 度", x, ret);
   
   return(0);
}

Lassen Sie uns zusammenzustellen und um das obige Programm ausführen, die in der folgenden führen:

1.000000 的反正切是 45.000000 度

C Standard-Bibliothek - <math.h> C Standard - Bibliothek - <math.h>