Everything

acos / acosf / acosl


Calculates the arc cosine of a floating-point number.

[Format]

#include <math.h>

double acos (double d);

float acosf (float d);

long double acosl (long double d);

[Parameters]

d Floating-point number for which arc cosine is to be computed

[Return values]

Normal: Arc cosine of d

Abnormal: Domain error: Returns not-a-number.

[Remarks]

A domain error occurs for a value of d not in the range [–1.0, +1.0].

The acos function returns the arc cosine in the range [0, π] by the radian.

If the function call is replaced by code that uses a trigonometric function unit, the function might no longer be reentrant. For details, refer to the item about -tfu in the section on compile options.