Mail Archives: djgpp-workers/2009/10/06/19:24:25
Am Dienstag, 6. Oktober 2009 schrieb Eric Rudd:
> Juan Manuel Guerrero wrote:
> > - jnz badarg
> > - movl 4(%esp), %eax
> > + jne badarg /* x = NaN */
> > + movl 12(%esp), %eax
>
> I wrote this routine many years ago, so I thought I would be in a good
> position to examine the proposed changes. When I ran the original code
> for atan2(3, +inf), it actually produced the correct answer, but after
> inspecting the code, I see that there actually *is* a bug, and that the
> correct result I got was because the value at 4(%esp) just happened to
> be zero on my platform. I agree with the changes proposed.
I noticed the bug while I was writting long double versions of atan2l.S,
atanl.S, tanl.S, sqrtl.S, sincosl.S, cosl.S, expl.S, sinl.S and may be some
other but still not all of them. The double versions have been used as
starting point. I needed them to port FFTW3 in the long double version.
> Unfortunately, if we want the code to conform to C99, most of these
> exception tests should be removed.
Even if those versions do not fully satisfy the C99 standard, I think it is
better than having no long double versions at all.
Regards,
Juan M. Guerrero
- Raw text -