public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/19046] New: ldbl-128 / ldbl-128ibm lgamma bad overflow handling
@ 2015-10-01 16:35 jsm28 at gcc dot gnu.org
2015-10-01 17:17 ` [Bug math/19046] " cvs-commit at gcc dot gnu.org
2015-10-01 17:18 ` jsm28 at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-10-01 16:35 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=19046
Bug ID: 19046
Summary: ldbl-128 / ldbl-128ibm lgamma bad overflow handling
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: ---
The ldbl-128 / ldbl-128ibm implementation of lgamma handles large arguments in
a way that results in spurious overflows. E.g., for mips64:
Failure: lgamma (0x5.c6aa645fffef5f5p+16368): Exception "Overflow" set
Failure: lgamma (0x5.c6aa645fffef5f5p+16368): errno set to 34, expected 0
(unchanged)
Failure: Test: lgamma (0x5.c6aa645fffef5f5p+16368)
Result:
is: inf inf
should be: 1.18973149535723176409107723032036400e+4932
0x1.ffffffffffffffe127acbfd5f54ap+16383
--
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/19046] ldbl-128 / ldbl-128ibm lgamma bad overflow handling
2015-10-01 16:35 [Bug math/19046] New: ldbl-128 / ldbl-128ibm lgamma bad overflow handling jsm28 at gcc dot gnu.org
@ 2015-10-01 17:17 ` cvs-commit at gcc dot gnu.org
2015-10-01 17:18 ` jsm28 at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-10-01 17:17 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=19046
--- 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 4b84e2471b5f0c9197073395eb77843c6f23e790 (commit)
from e27fcd027cbdc2f13bf440177c0434eb9ec3dd28 (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=4b84e2471b5f0c9197073395eb77843c6f23e790
commit 4b84e2471b5f0c9197073395eb77843c6f23e790
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu Oct 1 17:15:54 2015 +0000
Fix ldbl-128 / ldbl-128ibm lgamma overflow handling (bug 16347, bug 19046).
The ldbl-128 / ldbl-128ibm implementation of lgamma has problems with
its handling of large arguments. It has an overflow threshold that is
correct only for ldbl-128, despite being used for both types - with
diagnostic control macros as a temporary measure to disable warnings
about that constant overflowing for ldbl-128ibm - and it has a
calculation that's roughly x * log(x) - x, resulting in overflows for
arguments that are roughly at most a factor 1/log(threshold) below the
overflow threshold.
This patch fixes both issues, using an overflow threshold appropriate
for the type in question and adding another case for large arguments
that avoids the possible intermediate overflow.
Tested for x86_64, x86, mips64 and powerpc.
[BZ #16347]
[BZ #19046]
* sysdeps/ieee754/ldbl-128/e_lgammal_r.c: Do not include
<libc-internal.h>.
(MAXLGM): Do not use diagnostic control macros.
[LDBL_MANT_DIG == 106] (MAXLGM): Change value to overflow
threshold for ldbl-128ibm.
(__ieee754_lgammal_r): For large arguments, multiply by log - 1
instead of multiplying by log then subtracting.
* math/auto-libm-test-in: Add more tests of lgamma.
* math/auto-libm-test-out: Regenerated.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 12 +
NEWS | 16 +-
math/auto-libm-test-in | 18 +
math/auto-libm-test-out | 642 ++++++++++++++++++++++++++++++++
sysdeps/ieee754/ldbl-128/e_lgammal_r.c | 13 +-
5 files changed, 686 insertions(+), 15 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
* [Bug math/19046] ldbl-128 / ldbl-128ibm lgamma bad overflow handling
2015-10-01 16:35 [Bug math/19046] New: ldbl-128 / ldbl-128ibm lgamma bad overflow handling jsm28 at gcc dot gnu.org
2015-10-01 17:17 ` [Bug math/19046] " cvs-commit at gcc dot gnu.org
@ 2015-10-01 17:18 ` jsm28 at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-10-01 17:18 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=19046
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
end of thread, other threads:[~2015-10-01 17:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-01 16:35 [Bug math/19046] New: ldbl-128 / ldbl-128ibm lgamma bad overflow handling jsm28 at gcc dot gnu.org
2015-10-01 17:17 ` [Bug math/19046] " cvs-commit at gcc dot gnu.org
2015-10-01 17:18 ` 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).