public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/18956] New: powf inaccuracy
@ 2015-09-11 19:51 jsm28 at gcc dot gnu.org
2015-09-26 0:28 ` [Bug math/18956] " cvs-commit at gcc dot gnu.org
2015-09-26 0:28 ` jsm28 at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-09-11 19:51 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18956
Bug ID: 18956
Summary: powf inaccuracy
Product: glibc
Version: 2.22
Status: NEW
Severity: normal
Priority: P2
Component: math
Assignee: unassigned at sourceware dot org
Reporter: jsm28 at gcc dot gnu.org
Target Milestone: ---
Even in round-to-nearest mode, powf can have errors beyond the 9ulp maximum
accepted in glibc (seen on x86_64 and mips64):
Failure: Test: pow (0xd.73035p-4, -0x1.47bb8p+8)
Result:
is: 5.22400435890634124322e+24 0x1.148e7600000000000000p+82
should be: 5.22399859429881820899e+24 0x1.148e6200000000000000p+82
difference: 5.76460752303423488000e+18 0x1.40000000000000000000p+62
ulp : 10.0000
max.ulp : 3.0000
Failure: Test: pow_downward (0xd.73035p-4, -0x1.47bb8p+8)
Result:
is: 5.22398418278001062340e+24 0x1.148e3000000000000000p+82
should be: 5.22399801783806590556e+24 0x1.148e6000000000000000p+82
difference: 1.38350580552821637120e+19 0x1.80000000000000000000p+63
ulp : 24.0000
max.ulp : 4.0000
Failure: Test: pow_towardzero (0xd.73035p-4, -0x1.47bb8p+8)
Result:
is: 5.22398360631925831997e+24 0x1.148e2e00000000000000p+82
should be: 5.22399801783806590556e+24 0x1.148e6000000000000000p+82
difference: 1.44115188075855872000e+19 0x1.90000000000000000000p+63
ulp : 25.0000
max.ulp : 8.0000
Failure: Test: pow_upward (0xd.73035p-4, -0x1.47bb8p+8)
Result:
is: 5.22400435890634124323e+24 0x1.148e7600000000000000p+82
should be: 5.22399859429881820899e+24 0x1.148e6200000000000000p+82
difference: 5.76460752303423488000e+18 0x1.40000000000000000000p+62
ulp : 10.0000
max.ulp : 8.0000
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug math/18956] powf inaccuracy
2015-09-11 19:51 [Bug math/18956] New: powf inaccuracy jsm28 at gcc dot gnu.org
2015-09-26 0:28 ` [Bug math/18956] " cvs-commit at gcc dot gnu.org
@ 2015-09-26 0:28 ` jsm28 at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-09-26 0:28 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18956
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |2.23
--- Comment #2 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Fixed for 2.23.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug math/18956] powf inaccuracy
2015-09-11 19:51 [Bug math/18956] New: powf inaccuracy jsm28 at gcc dot gnu.org
@ 2015-09-26 0:28 ` cvs-commit at gcc dot gnu.org
2015-09-26 0:28 ` jsm28 at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-09-26 0:28 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18956
--- Comment #1 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 fa752c698146ca3e9f7747d33059fbef9bb02b0e (commit)
from 6ace39382120dd0668b2168591611f71b04ac8f3 (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=fa752c698146ca3e9f7747d33059fbef9bb02b0e
commit fa752c698146ca3e9f7747d33059fbef9bb02b0e
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat Sep 26 00:27:06 2015 +0000
Fix powf inaccuracy (bug 18956).
The flt-32 version of powf can be inaccurate because of bugs in the
extra-precision calculation of (x-1)/(x+1) or (x-1.5)/(x+1.5) as part
of calculating log(x) with extra precision: a constant used (as part
of adding 1 or 1.5 through integer arithmetic) is incorrect, and then
the code fails to mask a computed high part before using it in
arithmetic that relies on s_h*t_h being exactly representable. This
patch fixes these bugs.
Tested for x86_64 and x86. x86_64 ulps for powf removed and
regenerated to reflect reduced ulps from the increased accuracy for
existing tests.
[BZ #18956]
* sysdeps/ieee754/flt-32/e_powf.c (__ieee754_powf): Add 0x00400000
not 0x0040000 for high bit of mantissa. Mask with 0xfffff000 when
extracting high part.
* math/auto-libm-test-in: Add another test of pow.
* math/auto-libm-test-out: Regenerated.
* sysdeps/x86_64/fpu/libm-test-ulps: Update.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 10 ++++++++++
NEWS | 4 ++--
math/auto-libm-test-in | 1 +
math/auto-libm-test-out | 25 +++++++++++++++++++++++++
sysdeps/ieee754/flt-32/e_powf.c | 4 +++-
sysdeps/x86_64/fpu/libm-test-ulps | 16 ++++++++--------
6 files changed, 49 insertions(+), 11 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-26 0:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-11 19:51 [Bug math/18956] New: powf inaccuracy jsm28 at gcc dot gnu.org
2015-09-26 0:28 ` [Bug math/18956] " cvs-commit at gcc dot gnu.org
2015-09-26 0:28 ` jsm28 at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).