public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/15735] New: IBM long double fmodl and remainerl errors
@ 2013-07-12 14:57 amodra at gmail dot com
2013-10-05 3:01 ` [Bug math/15735] " amodra at gmail dot com
2014-06-13 9:24 ` fweimer at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: amodra at gmail dot com @ 2013-07-12 14:57 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15735
Bug ID: 15735
Summary: IBM long double fmodl and remainerl errors
Product: glibc
Version: 2.18
Status: NEW
Severity: normal
Priority: P2
Component: math
Assignee: unassigned at sourceware dot org
Reporter: amodra at gmail dot com
IBM long double fmodl and remainderl return erroneous values in numerous cases.
Two such cases are demonstrated in the following testcase. The first result
should be 0x1p-53 rather than 0x1.00000000000004p+0. The second result should
be -0x1p-53 rather than -0.0.
#include <stdio.h>
#include <math.h>
int
main (void)
{
long double x, y, z;
union { long double ld; double d[2]; } u;
x = 0x1.00000000000004p+0L;
y = 0x1.fffffffffffff8p-1L;
z = fmodl (x, y);
u.ld = x;
printf ("%24.21Lf %36La %21a %21a\n", u.ld, u.ld, u.d[0], u.d[1]);
u.ld = y;
printf ("%24.21Lf %36La %21a %21a\n", u.ld, u.ld, u.d[0], u.d[1]);
u.ld = z;
printf ("%24.21Lf %36La %21a %21a\n", u.ld, u.ld, u.d[0], u.d[1]);
x = -0x1.00000000000004p+0L;
y = 0x1.fffffffffffff8p-1L;
z = fmodl (x, y);
u.ld = x;
printf ("%24.21Lf %36La %21a %21a\n", u.ld, u.ld, u.d[0], u.d[1]);
u.ld = y;
printf ("%24.21Lf %36La %21a %21a\n", u.ld, u.ld, u.d[0], u.d[1]);
u.ld = z;
printf ("%24.21Lf %36La %21a %21a\n", u.ld, u.ld, u.d[0], u.d[1]);
return 0;
}
--
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/15735] IBM long double fmodl and remainerl errors
2013-07-12 14:57 [Bug math/15735] New: IBM long double fmodl and remainerl errors amodra at gmail dot com
@ 2013-10-05 3:01 ` amodra at gmail dot com
2014-06-13 9:24 ` fweimer at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: amodra at gmail dot com @ 2013-10-05 3:01 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=15735
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
URL| |http://sourceware.org/ml/li
| |bc-alpha/2013-08/msg00084.h
| |tml
Resolution|--- |FIXED
Target Milestone|--- |2.19
--- Comment #1 from Alan Modra <amodra at gmail dot com> ---
Fixed
--
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/15735] IBM long double fmodl and remainerl errors
2013-07-12 14:57 [Bug math/15735] New: IBM long double fmodl and remainerl errors amodra at gmail dot com
2013-10-05 3:01 ` [Bug math/15735] " amodra at gmail dot com
@ 2014-06-13 9:24 ` fweimer at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 9:24 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=15735
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] 3+ messages in thread
end of thread, other threads:[~2014-06-13 9:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-12 14:57 [Bug math/15735] New: IBM long double fmodl and remainerl errors amodra at gmail dot com
2013-10-05 3:01 ` [Bug math/15735] " amodra at gmail dot com
2014-06-13 9:24 ` 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).