PATCH: atan2 +0/-0 special case wrapper fixes

Jeff Johnston jjohnstn@redhat.com
Thu May 17 23:44:00 GMT 2007


Patch checked in.  Could you make a similar change for the mathfp directory?

-- Jeff J.

Cary R. wrote:
> The wrapper code for atan2 returns 0.0 and raises a domain error if both
> arguments to atan2 are zero (ignoring the sign). Recent versions of glibc
> return the result specified in the base atan2 functionality and explicitly
> state that this (atan2(0,0), etc.) does not raise a domain error. This
> patch removes all the special case code in the wrapper files since it is
> not needed to get the same result as glibc. The documentation is also
> updated to be consistent with these changes.
> 
> Here's something for the Changelog.
> 
> * libm/math/w_atan2.c: Fix atan2 to be consistent with glibc
> (atan2(+0,-0), atan2(-0,-0) and atan(-0,+0))
> * libm/math/wf_atan2.c: Ditto.
> 
> The patch and a test program are attached.
> 
> Cary
> 
> 
>  
> ____________________________________________________________________________________
> Don't pick lemons.
> See all the new 2007 cars at Yahoo! Autos.
> http://autos.yahoo.com/new_cars.html 



More information about the Newlib mailing list