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 - arc cosine function
&pagelevel(4)&pagelevel
Syntax | #include <math.h> double acos(double x); C11 float acosf(float x); long double acosl(long double x); (End) |
Description | These functions are the inverse function of the corresponding cos() -functions. They return the principal value (i.e. corresponding angle in radians) of the arc cosine of a floating-point number x in the range [-1.0, +1.0]. |
Return val. | arc cosine(x) if successful. A floating-point number of type double in the range [0, pi] is returned. 0 if x does not lie in the range [-1.0, +1.0]. errno is set to indicate the error. |
Errors | acos() will fail if:
EDOM The value of x is not in the range [-1.0, +1.0].
|
Note | To make sure you catch an error, you should set errno to 0 before calling acos() . If after execution errno != 0, an error has occurred. |
See also | asin() , atan() , atan2() , cos() , sin() , tan() , math.h .
|