public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/18244] New: remquol(x, INFINITY, &quo) is wrong on x86_64
@ 2015-04-10 12:20 nszabolcs at gmail dot com
2015-05-19 23:45 ` [Bug math/18244] " cvs-commit at gcc dot gnu.org
2015-05-19 23:46 ` jsm28 at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: nszabolcs at gmail dot com @ 2015-04-10 12:20 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18244
Bug ID: 18244
Summary: remquol(x, INFINITY, &quo) is wrong on x86_64
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: math
Assignee: unassigned at sourceware dot org
Reporter: nszabolcs at gmail dot com
remquol(x, INFINITY, &quo) should return x (that's the remainder)
the following code on linux x86_64 prints:
remquol(42,inf) = -nan quo = 0 invalid=1
remquol(42,-inf) = -nan quo = 0 invalid=1
#include <fenv.h>
#include <math.h>
#include <stdio.h>
int main()
{
#pragma STDC FENV_ACCESS ON
int quo;
long double r;
feclearexcept(FE_ALL_EXCEPT);
r = remquol(42, INFINITY, &quo);
if (r != 42)
printf("remquol(42,inf) = %La quo = %d invalid=%d\n", r, quo,
fetestexcept(FE_INVALID));
feclearexcept(FE_ALL_EXCEPT);
r = remquol(42, -INFINITY, &quo);
if (r != 42)
printf("remquol(42,-inf) = %La quo = %d invalid=%d\n", r, quo,
fetestexcept(FE_INVALID));
}
--
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/18244] remquol(x, INFINITY, &quo) is wrong on x86_64
2015-04-10 12:20 [Bug math/18244] New: remquol(x, INFINITY, &quo) is wrong on x86_64 nszabolcs at gmail dot com
@ 2015-05-19 23:45 ` cvs-commit at gcc dot gnu.org
2015-05-19 23:46 ` jsm28 at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-05-19 23:45 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18244
--- 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 3ce2232efb008e129908b9f35c4266991d9361de (commit)
from 526af54142db14c1edcd2d80dc1b56d33ff4e8ce (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=3ce2232efb008e129908b9f35c4266991d9361de
commit 3ce2232efb008e129908b9f35c4266991d9361de
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue May 19 23:44:28 2015 +0000
Fix ldbl-96 remquol (finite, Inf) (bug 18244).
ldbl-96 remquol wrongly handles the case where the first argument is
finite and the second infinite, because the check for the second
argument being a NaN fails to disregard the explicit high mantissa bit
and so wrongly interprets an infinity as being a NaN. This patch
fixes this by masking off that bit, and improves test coverage for
both remainder and remquo (various cases were missing tests, or, as in
the case of the bug, were tested only for one of the two functions).
Tested for x86_64 and x86.
[BZ #18244]
* sysdeps/ieee754/ldbl-96/s_remquol.c (__remquol): Ignore explicit
high mantissa bit when testing whether P is a NaN.
* math/libm-test.inc (remainder_test_data): Add more tests.
(remquo_test_data): Likewise.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 +++++
NEWS | 4 +-
math/libm-test.inc | 37 +++++++++++++++++++++++++++++++++++
sysdeps/ieee754/ldbl-96/s_remquol.c | 2 +-
4 files changed, 46 insertions(+), 3 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/18244] remquol(x, INFINITY, &quo) is wrong on x86_64
2015-04-10 12:20 [Bug math/18244] New: remquol(x, INFINITY, &quo) is wrong on x86_64 nszabolcs at gmail dot com
2015-05-19 23:45 ` [Bug math/18244] " cvs-commit at gcc dot gnu.org
@ 2015-05-19 23:46 ` jsm28 at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-05-19 23:46 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18244
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.22.
--
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-05-19 23:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10 12:20 [Bug math/18244] New: remquol(x, INFINITY, &quo) is wrong on x86_64 nszabolcs at gmail dot com
2015-05-19 23:45 ` [Bug math/18244] " cvs-commit at gcc dot gnu.org
2015-05-19 23:46 ` 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).