Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

acos, acosf, acosl - Arcuscosinus

&pagelevel(4)&pagelevel

Definition

#include <math.h>

double acos(double x);
float acosf(float x); (C11)
long double acosl(long double x); (C11)

Diese Funktionen sind die Umkehrfunktionen zu den entsprechenden cos-Funktionen und berechnen zu einer Zahl x aus dem Intervall [-1.0, +1.0] den entsprechenden Winkel im Bogenmaß (Arcuscosinus).

Returnwert

arcuscosinus(x)



eine Gleitkommazahl entsprechend des Funktionstyps aus [0, pi] für Werte x aus dem Intervall [-1.0, +1.0].


0      

für Werte außerhalb [-1.0, +1.0]. Zusätzlich wird errno auf EDOM gesetzt (domain error, d.h. Argument zu groß).

Beispiel

 Folgendes Programm druckt für Werte aus dem Intervall [0.0, 1.0] die entsprechenden Arcuscosinus-Werte:

#include <math.h>
#include <stdio.h>
int main(void)
{
  double x;
  for(x = 0.0; x <= 1.0; x = x + 0.1)
  printf("x = %g : acos(%g) = %g\n", x, x, acos(x));
  return 0;
}

Siehe auch

cos, sin, tan, asin, atan, atan2