This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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] |
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
Attachment:
atan2.patch
Description: 3987802099-atan2.patch
Attachment:
chk_atan2.c
Description: 1898335329-chk_atan2.c
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |