PATH Optimized with SSE2 sinf and cof for x86_32

Rich Felker dalias@aerifal.cx
Wed Aug 15 16:26:00 GMT 2012


On Wed, Aug 15, 2012 at 01:44:54PM +0400, Dmitrieva Liubov wrote:
> >> Please remove the Contributed line, we're not adding this anymore.
> 
> Done and reattached. Please review, I'm going to submit SSE sincos for
> x86_64 after this patch merge.

This code is wrong. You cannot perform argument reduction for large
arguments by using a single, double, or even extended-precision
approximation for pi. This bug (16 million ulps of error in sinf/cosf)
keeps getting reintroduced by well-meaning people who don't understand
the issue. Please test cosf(0x1p120) and sinf(0x1p120) before
proceeding with this. Their values should be:

cosf(0x1p+120) = -0.925879002
sinf(0x1p+120) = 0.377820104

Rich



More information about the Libc-alpha mailing list