This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug math/369] New: pow problems on x86
- From: "vargaz at gmail dot com" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 6 Sep 2004 12:23:52 -0000
- Subject: [Bug math/369] New: pow problems on x86
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
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.