public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/16339] New: log1p missing underflows
@ 2013-12-18 0:20 jsm28 at gcc dot gnu.org
2014-01-29 12:00 ` [Bug math/16339] " zimmerma+gcc at loria dot fr
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-12-18 0:20 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16339
Bug ID: 16339
Summary: log1p missing underflows
Product: glibc
Version: 2.19
Status: NEW
Severity: normal
Priority: P2
Component: math
Assignee: unassigned at sourceware dot org
Reporter: jsm28 at gcc dot gnu.org
log1p (subnormal) produces an inexact result so should raise the underflow
exception. But on x86_64, log1pf (0x1p-149) and log1p (0x1p-1074) do not raise
that exception,
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug math/16339] log1p missing underflows
2013-12-18 0:20 [Bug math/16339] New: log1p missing underflows jsm28 at gcc dot gnu.org
@ 2014-01-29 12:00 ` zimmerma+gcc at loria dot fr
2014-01-29 16:39 ` joseph at codesourcery dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2014-01-29 12:00 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16339
Paul Zimmermann <zimmerma+gcc at loria dot fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zimmerma+gcc at loria dot fr
--- Comment #1 from Paul Zimmermann <zimmerma+gcc at loria dot fr> ---
on the other hand we get some spurious underflow exceptions, for example for
long double on x86_64:
Testing function log1p for exponent 16383 [seed=8473].
rounding mode MPFR_RNDD:
wrong underflow flag: mpfr gives 0, library 16
x=-3.36210314311209350626e-4932
library gives -3.36210314311209350626e-4932
mpfr gives -3.36210314311209350663e-4932
The glibc result is incorrect since log(1+x) = x - x^2/2 + o(x^2), thus it is
smaller than x for tiny x, and rounding down should give nextbelow(x).
Since |x| is the smallest normal number, no underflow exception should be
raised.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug math/16339] log1p missing underflows
2013-12-18 0:20 [Bug math/16339] New: log1p missing underflows jsm28 at gcc dot gnu.org
2014-01-29 12:00 ` [Bug math/16339] " zimmerma+gcc at loria dot fr
@ 2014-01-29 16:39 ` joseph at codesourcery dot com
2014-01-29 16:48 ` zimmerma+gcc at loria dot fr
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: joseph at codesourcery dot com @ 2014-01-29 16:39 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=16339
--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Does not seem spurious (consistent with a slightly inaccurate
infinite-precision value). In any case, spurious exceptions are almost
always separate bugs from missing exceptions.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug math/16339] log1p missing underflows
2013-12-18 0:20 [Bug math/16339] New: log1p missing underflows jsm28 at gcc dot gnu.org
2014-01-29 12:00 ` [Bug math/16339] " zimmerma+gcc at loria dot fr
2014-01-29 16:39 ` joseph at codesourcery dot com
@ 2014-01-29 16:48 ` zimmerma+gcc at loria dot fr
2014-06-13 11:25 ` fweimer at redhat dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2014-01-29 16:48 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16339
--- Comment #3 from Paul Zimmermann <zimmerma+gcc at loria dot fr> ---
(In reply to joseph@codesourcery.com from comment #2)
> Does not seem spurious (consistent with a slightly inaccurate
> infinite-precision value). In any case, spurious exceptions are almost
> always separate bugs from missing exceptions.
ok, I retract Comment 1.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug math/16339] log1p missing underflows
2013-12-18 0:20 [Bug math/16339] New: log1p missing underflows jsm28 at gcc dot gnu.org
` (2 preceding siblings ...)
2014-01-29 16:48 ` zimmerma+gcc at loria dot fr
@ 2014-06-13 11:25 ` fweimer at redhat dot com
2015-04-10 16:43 ` jsm28 at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 11:25 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16339
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug math/16339] log1p missing underflows
2013-12-18 0:20 [Bug math/16339] New: log1p missing underflows jsm28 at gcc dot gnu.org
` (3 preceding siblings ...)
2014-06-13 11:25 ` fweimer at redhat dot com
@ 2015-04-10 16:43 ` jsm28 at gcc dot gnu.org
2015-05-14 23:39 ` cvs-commit at gcc dot gnu.org
2015-05-14 23:39 ` jsm28 at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-04-10 16:43 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16339
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nszabolcs at gmail dot com
--- Comment #4 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
*** Bug 18248 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug math/16339] log1p missing underflows
2013-12-18 0:20 [Bug math/16339] New: log1p missing underflows jsm28 at gcc dot gnu.org
` (5 preceding siblings ...)
2015-05-14 23:39 ` cvs-commit at gcc dot gnu.org
@ 2015-05-14 23:39 ` jsm28 at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-05-14 23:39 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16339
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 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] 8+ messages in thread
* [Bug math/16339] log1p missing underflows
2013-12-18 0:20 [Bug math/16339] New: log1p missing underflows jsm28 at gcc dot gnu.org
` (4 preceding siblings ...)
2015-04-10 16:43 ` jsm28 at gcc dot gnu.org
@ 2015-05-14 23:39 ` cvs-commit at gcc dot gnu.org
2015-05-14 23:39 ` jsm28 at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-05-14 23:39 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16339
--- Comment #5 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 0b7a5f920163d03806d7c5d9d1c83b16942c9496 (commit)
from 95b07fbcc702a83b421cb5d0488ba2817d3123c1 (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=0b7a5f920163d03806d7c5d9d1c83b16942c9496
commit 0b7a5f920163d03806d7c5d9d1c83b16942c9496
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu May 14 23:38:07 2015 +0000
Fix log1p missing underflows (bug 16339).
Similar to various other bugs in this area, some log1p implementations
do not raise the underflow exception for subnormal arguments, when the
result is tiny and inexact. This patch forces the exception in a
similar way to previous fixes. (The ldbl-128ibm implementation
doesn't currently need any change as it already generates this
exception, albeit through code that would generate spurious exceptions
in other cases; special code for this issue will only be needed there
when fixing the spurious exceptions.)
Tested for x86_64, x86, powerpc and mips64.
[BZ #16339]
* sysdeps/i386/fpu/s_log1p.S (dbl_min): New object.
(__log1p): Force underflow exception for results with small
absolute value.
* sysdeps/i386/fpu/s_log1pf.S (flt_min): New object.
(__log1pf): Force underflow exception for results with small
absolute value.
* sysdeps/ieee754/dbl-64/s_log1p.c: Include <float.h>.
(__log1p): Force underflow exception for results with small
absolute value.
* sysdeps/ieee754/flt-32/s_log1pf.c: Include <float.h>.
(__log1pf): Force underflow exception for results with small
absolute value.
* sysdeps/ieee754/ldbl-128/s_log1pl.c: Include <float.h>.
(__log1pl): Force underflow exception for results with small
absolute value.
* math/auto-libm-test-in: Do not allow missing underflow
exceptions from log1p.
* math/auto-libm-test-out: Regenerated.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 22 ++++
NEWS | 2 +-
math/auto-libm-test-in | 9 +-
math/auto-libm-test-out | 200 +++++++++++++++++-----------------
sysdeps/i386/fpu/s_log1p.S | 27 +++++-
sysdeps/i386/fpu/s_log1pf.S | 27 +++++-
sysdeps/ieee754/dbl-64/s_log1p.c | 10 ++-
sysdeps/ieee754/flt-32/s_log1pf.c | 8 ++
sysdeps/ieee754/ldbl-128/s_log1pl.c | 6 +
9 files changed, 202 insertions(+), 109 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-05-14 23:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-18 0:20 [Bug math/16339] New: log1p missing underflows jsm28 at gcc dot gnu.org
2014-01-29 12:00 ` [Bug math/16339] " zimmerma+gcc at loria dot fr
2014-01-29 16:39 ` joseph at codesourcery dot com
2014-01-29 16:48 ` zimmerma+gcc at loria dot fr
2014-06-13 11:25 ` fweimer at redhat dot com
2015-04-10 16:43 ` jsm28 at gcc dot gnu.org
2015-05-14 23:39 ` cvs-commit at gcc dot gnu.org
2015-05-14 23:39 ` 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).