public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/16337] New: ldbl-128 lgammal overflows for small negative arguments
@ 2013-12-17 23:56 jsm28 at gcc dot gnu.org
2013-12-22 20:51 ` [Bug math/16337] " cvs-commit at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-12-17 23:56 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16337
Bug ID: 16337
Summary: ldbl-128 lgammal overflows for small negative
arguments
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
The ldbl-128 implementation of lgammal overflows for small negative arguments.
For example:
Failure: lgamma (-0x1p-10000): errno set to 34, expected 0 (unchanged)
Failure: Test: lgamma (-0x1p-10000)
Result:
is: inf inf
should be: 6.93147180559945309417e+03 0x1.b1378c84073b880c67e5p+12
--
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/16337] ldbl-128 lgammal overflows for small negative arguments
2013-12-17 23:56 [Bug math/16337] New: ldbl-128 lgammal overflows for small negative arguments jsm28 at gcc dot gnu.org
@ 2013-12-22 20:51 ` cvs-commit at gcc dot gnu.org
2013-12-22 20:51 ` jsm28 at gcc dot gnu.org
2014-06-13 9:30 ` fweimer at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2013-12-22 20:51 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=16337
--- 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 4f40e4b30754c678b7f93cfb9a545deb534f7e4e (commit)
from ef7344f09c5ce00eb519ed14598b2a8e39c68387 (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=4f40e4b30754c678b7f93cfb9a545deb534f7e4e
commit 4f40e4b30754c678b7f93cfb9a545deb534f7e4e
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sun Dec 22 20:50:16 2013 +0000
Fix ldbl-128 lgammal for small negative arguments (bug 16337).
This patch fixes bug 16337, ldbl-128 lgammal spurious overflows for
small negative arguments (the arguments in question are already in the
testsuite). The implementation uses the reflection formula to compute
lgamma of negative x from lgamma of -x, effectively resulting in a
calculation -log(x^2) + log(-x); cancellation isn't problematic in
this case (bugs for problematic cancellation in lgamma are 2542, 2543,
2558), but the x^2 calculation can underflow (in which case there is
spurious logic to return an overflowing value - lgamma can only ever
correctly overflow for large positive arguments, though tgamma can
overflow for small arguments of either sign as well as large positive
arguments). The fix is simply to calculate the result directly with
logl when the argument is a small enough negative number.
Tested mips64.
* sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r):
Calculate results for small negative arguments directly rather
than using reflection formula with special underflow handling.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
NEWS | 2 +-
sysdeps/ieee754/ldbl-128/e_lgammal_r.c | 4 ++--
3 files changed, 8 insertions(+), 3 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/16337] ldbl-128 lgammal overflows for small negative arguments
2013-12-17 23:56 [Bug math/16337] New: ldbl-128 lgammal overflows for small negative arguments jsm28 at gcc dot gnu.org
2013-12-22 20:51 ` [Bug math/16337] " cvs-commit at gcc dot gnu.org
@ 2013-12-22 20:51 ` jsm28 at gcc dot gnu.org
2014-06-13 9:30 ` fweimer at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-12-22 20:51 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16337
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Fixed for 2.19.
--
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/16337] ldbl-128 lgammal overflows for small negative arguments
2013-12-17 23:56 [Bug math/16337] New: ldbl-128 lgammal overflows for small negative arguments jsm28 at gcc dot gnu.org
2013-12-22 20:51 ` [Bug math/16337] " cvs-commit at gcc dot gnu.org
2013-12-22 20:51 ` jsm28 at gcc dot gnu.org
@ 2014-06-13 9:30 ` fweimer at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 9:30 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=16337
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] 4+ messages in thread
end of thread, other threads:[~2014-06-13 9:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-17 23:56 [Bug math/16337] New: ldbl-128 lgammal overflows for small negative arguments jsm28 at gcc dot gnu.org
2013-12-22 20:51 ` [Bug math/16337] " cvs-commit at gcc dot gnu.org
2013-12-22 20:51 ` jsm28 at gcc dot gnu.org
2014-06-13 9:30 ` fweimer at redhat dot com
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).