atan, atanl

Aus RAD Studio
Wechseln zu: Navigation, Suche

Nach oben zu Math.h - Index


Header-Datei

math.h

Kategorie

Mathematische Routinen

Prototyp

double atan(double x);
long double atanl(long double x);

Beschreibung

Berechnet den Arcustangens.

atan berechnet den Arcustangens des Eingabewerts.

atanl ist die long double-Version. Sie benötigt ein Argument vom Typ long double und gibt ein Ergebnis vom Typ long double zurück.

Rückgabewert

atan und atanl geben bei Angabe eines gültigen Arguments einen Wert im Bereich zwischen -pi/2 bis pi/2 zurück. Die Fehlerbehandlung für diese Routinen kann über die Funktionen _matherr und _matherrl geändert werden.

Beispiel

#include <stdio.h>
#include <math.h>
int main(void)
{
   double result;
   double x = 0.5;
   result = atan(x);
   printf("The arc tangent of %lf is %lf\n", x, result);
   return(0);
}

Portabilität

POSIX Win32 ANSI C ANSI C++

atan

+

+

+

+

atanl

+

+

+