public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/18219] New: exp2f spurious underflows
@ 2015-04-08 20:12 jsm28 at gcc dot gnu.org
2015-06-23 14:18 ` [Bug math/18219] exp2, " jsm28 at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-04-08 20:12 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18219
Bug ID: 18219
Summary: exp2f spurious underflows
Product: glibc
Version: 2.21
Status: NEW
Severity: normal
Priority: P2
Component: math
Assignee: unassigned at sourceware dot org
Reporter: jsm28 at gcc dot gnu.org
The flt-32 implementation of exp2f produces spurious underflow exceptions. For
example, on x86_64, exp2f (-116.5f) produces such an exception, although the
result does not underflow.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug math/18219] exp2, exp2f spurious underflows
2015-04-08 20:12 [Bug math/18219] New: exp2f spurious underflows jsm28 at gcc dot gnu.org
@ 2015-06-23 14:18 ` jsm28 at gcc dot gnu.org
2015-06-23 14:36 ` cvs-commit at gcc dot gnu.org
2015-06-23 14:36 ` jsm28 at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-06-23 14:18 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18219
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|exp2f spurious underflows |exp2, exp2f spurious
| |underflows
--- Comment #1 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Same applies to dbl-64, e.g. exp2 (-1019.5), for the same underlying reason.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug math/18219] exp2, exp2f spurious underflows
2015-04-08 20:12 [Bug math/18219] New: exp2f spurious underflows jsm28 at gcc dot gnu.org
2015-06-23 14:18 ` [Bug math/18219] exp2, " jsm28 at gcc dot gnu.org
@ 2015-06-23 14:36 ` cvs-commit at gcc dot gnu.org
2015-06-23 14:36 ` jsm28 at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-06-23 14:36 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18219
--- 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 b59549574efeeecf124de05c9183c120eaaa56f0 (commit)
from b57525f1a376149840f740a31535681c07152ba4 (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=b59549574efeeecf124de05c9183c120eaaa56f0
commit b59549574efeeecf124de05c9183c120eaaa56f0
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Jun 23 14:35:18 2015 +0000
Fix exp2, exp2f spurious underflows (bug 18219).
The dbl-64 and flt-32 implementations of exp2 functions produce
spurious underflow exceptions. The underlying reason is the same in
both cases: the computation works as (2^a - 1)*2^b + 2^b for suitably
chosen a and b, where a has small magnitude so 2^a - 1 can be computed
with a low-degree polynomial approximation, and (2^a - 1)*2^b can
underflow even when the final result does not. This patch fixes this
by adjusting the threshold for when scaling is used to avoid
intermediate underflow so it works for any possible value of a where
the final result would not underflow.
Tested for x86_64 and x86.
[BZ #18219]
* sysdeps/ieee754/dbl-64/e_exp2.c (__ieee754_exp2): Reduce
threshold on absolute value of exponent for which scaling is used.
* sysdeps/ieee754/flt-32/e_exp2f.c (__ieee754_exp2f): Likewise.
* math/auto-libm-test-in: Add more tests of exp2.
* math/auto-libm-test-out: Regenerated.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 9 ++
NEWS | 12 ++--
math/auto-libm-test-in | 7 ++
math/auto-libm-test-out | 175 ++++++++++++++++++++++++++++++++++++++
sysdeps/ieee754/dbl-64/e_exp2.c | 4 +-
sysdeps/ieee754/flt-32/e_exp2f.c | 4 +-
6 files changed, 203 insertions(+), 8 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug math/18219] exp2, exp2f spurious underflows
2015-04-08 20:12 [Bug math/18219] New: exp2f spurious underflows jsm28 at gcc dot gnu.org
2015-06-23 14:18 ` [Bug math/18219] exp2, " jsm28 at gcc dot gnu.org
2015-06-23 14:36 ` cvs-commit at gcc dot gnu.org
@ 2015-06-23 14:36 ` jsm28 at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-06-23 14:36 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18219
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Fixed for 2.22.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-23 14:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-08 20:12 [Bug math/18219] New: exp2f spurious underflows jsm28 at gcc dot gnu.org
2015-06-23 14:18 ` [Bug math/18219] exp2, " jsm28 at gcc dot gnu.org
2015-06-23 14:36 ` cvs-commit at gcc dot gnu.org
2015-06-23 14:36 ` 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).