[Bug math/369] New: pow problems on x86
vargaz at gmail dot com
sourceware-bugzilla@sources.redhat.com
Mon Sep 6 12:24:00 GMT 2004
Consider the following test program:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#include <stdio.h>
#include <math.h>
void main() {
double d;
d = pow (-2, 1E300);
printf ("D: %f.\n", d);
d = pow (-2, -1E300);
printf ("D: %f.\n", d);
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Under x86 linux, this prints out:
D: nan.
D: nan
I think the answer should be +inf and 0, respectively. Both
solaris,
windows, and the IBM Accurate Portable Mathematical library
returns
these values, so I think this might be a bug in the assembly
language
pow routine in glibc.
--
Summary: pow problems on x86
Product: glibc
Version: 2.3.2
Status: NEW
Severity: normal
Priority: P2
Component: math
AssignedTo: aj at suse dot de
ReportedBy: vargaz at gmail dot com
CC: glibc-bugs at sources dot redhat dot com
GCC host triplet: i686-pc-linux-gnu
http://sources.redhat.com/bugzilla/show_bug.cgi?id=369
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the Glibc-bugs
mailing list