[PATCH] fix for accuracy problem in atan2f

Bob Wilson bwilson@tensilica.com
Wed Jul 20 15:59:00 GMT 2005


This patch fixes a problem with the accuracy of atan2f by changing to 
use the round-to-nearest value of pi.  See 
http://lists.freebsd.org/pipermail/cvs-all/2004-June/067012.html for a 
better description of the issue.  A similar change was made to glibc 
back in July 1997, but there was a typo in that change, for which I have 
just submitted a patch: 
http://sources.redhat.com/ml/libc-alpha/2005-07/msg00042.html.  See my 
glibc patch if you want a testcase to demonstrate the problem.

2005-07-20  Bob Wilson  <bob.wilson@acm.org>
            Darin Petkov <darin@tensilica.com>

        * libm/math/ef_atan2.c (pi, pi_lo): Use round-to-nearest value 
of pi.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: atan2f.patch
URL: <http://sourceware.org/pipermail/newlib/attachments/20050720/17588ed4/attachment.ksh>


More information about the Newlib mailing list