This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/18244] New: remquol(x, INFINITY, &quo) is wrong on x86_64
- From: "nszabolcs at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 10 Apr 2015 12:20:35 +0000
- Subject: [Bug math/18244] New: remquol(x, INFINITY, &quo) is wrong on x86_64
- Auto-submitted: auto-generated
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.