While bitching about GCC's math in a Slashdot post that I no longer even care enough about to post, I was inspired to try to track down the original glibc bug, and found it rather easily just by searching for "glibc bug 3976" which makes me wonder why I couldn't find it before.
http://sourceware.org/bugzilla/show_bug.cgi?id=3976It seems it does claim to have corrected the bug for cos(). Indeed, checking on a recent Linux Mint 15 install, I see that the test program in my own
bug report no longer creates any output, whereas my current system (which is Linux Mint 14 I think) still contains the bug.
IIRC, I ran the same test on FreeBSD's C library and found that it too was a little buggy in that some of the results weren't accurate to 64 bits, but they were accurate to some number of bits whereas the numbers previously coming out of glibc were inaccurate in all bits and then some.