Inverse cosine is defined only between -1 and 1, inclusive. The arc-cosine of 1.0000000000000002 has no mathematical or semantic meaning other than "does not exist" or "undefined".
Of course, since inverse cosine of 1 does exist, acos(1) doesn't throw any error.