This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/21094] cosf(1.57079697) has 3 ulp error on targets where the generic c code is used
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 15 Mar 2017 22:01:53 +0000
- Subject: [Bug math/21094] cosf(1.57079697) has 3 ulp error on targets where the generic c code is used
- Auto-submitted: auto-generated
- References: <bug-21094-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21094
--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via e4e52ff059f46472145433d2bd003d5383f89e82 (commit)
from 5d20a49aaccef5ef7adac93d5ca159f6b7ba0105 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e4e52ff059f46472145433d2bd003d5383f89e82
commit e4e52ff059f46472145433d2bd003d5383f89e82
Author: Joseph Myers <joseph@codesourcery.com>
Date: Wed Mar 15 22:00:54 2017 +0000
Improve float range reduction accuracy near pi/2 (bug 21094).
Bug 21094 reports 3ulp errors of cosf and tanf for certain arguments
near pi/2 arising from the use of an insufficiently accurate range
reduction. (To be clear, this is a quality-of-implementation issue
relating to the apparent intent of those particular cosf and tanf
implementations; 3ulp is within the general glibc accuracy goals, so
not inherently a bug.)
This patch fixes that error by making a wider range of cases use the
existing more accurate range reduction for arguments close to pi/2.
The wider range of values is still narrow enough for the "z -=
pio2_2;" in the more accurate case to be exact, as the code expects.
Tested for x86_64, x86 and mips64; no ulps updates needed (but at
least on mips64, the larger ulps were seen if the tests were added
without the substantive fix).
[BZ #21094]
* sysdeps/ieee754/flt-32/e_rem_pio2f.c (__ieee754_rem_pio2f): Use
24+24+24-bit pi for wider range of values around pi/2.
* math/auto-libm-test-in: Add more tests of cos and tan.
* math/auto-libm-test-out-cos: Regenerated.
* math/auto-libm-test-out-tan: Likewise.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 9 +
math/auto-libm-test-in | 4 +
math/auto-libm-test-out-cos | 290 ++++++++++++++++++++++++++++++++++
math/auto-libm-test-out-tan | 290 ++++++++++++++++++++++++++++++++++
sysdeps/ieee754/flt-32/e_rem_pio2f.c | 4 +-
5 files changed, 595 insertions(+), 2 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.