Henri wrote:
glibc implements acos() as the FPU equivalent of atan2(sqrt(1 - x ^ 2), x).
I just looked, and there are several implementations of acos in glibc, and they all seem to very carefully choose how to do it based on how close x is to 1.
This should be fixed on the glibc side as well
Indeed. Have you filed a bug report against glibc yet? I didn't see one at http://sourceware.org/bugzilla/ Please be sure to attach a simple C program that reproduces the problem, or better yet, a patch to add a test case to their test suite.