# <!-- var kmNextPage = "c51_acos517.htm"; var kmPrevPage = "c51_abs.htm"; var kmNextPageTitle = "acos517"; var kmPrevPageTitle = "abs"; var kmBreadCrumbs = "<a href=\"default.htm\">Home</a> &raquo; <a href=\"c51_library.htm\">Library Reference</a> &raquo; <a href=\"c51_libref.htm\">Reference</a> &raquo; acos"; kmSetupPaging (); kmNavButtons(); //--> acos

 Summary ```#include float acos ( float x); /* number to calculate arc cosine of */ ``` Description The acos function calculates the arc cosine of the floating-point number x whose value must be between -1 and 1. The floating-point value returned by acos is a number in the range 0-π. Return Value The acos function returns the arc cosine of x. For x ∈ [-1, 1], acos(x) → [0, π]. For x ∈ (-∞, -1) ∪ (1, ∞), acos(x) → NaN. See Also Example ```#include #include /* for printf */ void tst_acos (void) { float x; float y; for (x = -1.0; x <= 1.0; x += 0.1) { y = acos (x); printf ("ACOS(%f) = %f\n", x, y); } } ```

##### Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.