This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATH Optimized with SSE2 sinf and cof for x86_32


> This code is wrong. You cannot perform argument reduction for large
> arguments by using a single, double, or even extended-precision
> approximation for pi.

Yes, that's wrong in x86_32 version and will be fixed but 64 bit
version looks ok.

http://sourceware.org/ml/libc-alpha/2012-08/msg00267.html

--
Liubov Dmitrieva


2012/8/15 Rich Felker <dalias@aerifal.cx>:
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]