This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/403] New: exp10 gives nonsense results
- From: "fabian at fs-maphy dot uni-hannover dot de" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 24 Sep 2004 07:32:38 -0000
- Subject: [Bug libc/403] New: exp10 gives nonsense results
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
Hi,
exp10 gives me always the same result for different parameters.
When I assign some variables before, the results will be
different (i.e. 1 instead of -1.996864) but still the same
for different parameters
#include <math.h>
#include <stdio.h>
int main(int argc, char **argv) {
/* double x, y;
x = 5;
y = exp10(x);
printf("exp10(x) = %f\n", y); */
printf("exp10(-4) = %f\n", exp10(-4.));
printf("exp10(-1) = %f\n", exp10(-1.));
printf("exp10(0) = %f\n", exp10(0.));
printf("exp10(1) = %f\n", exp10(1.));
printf("exp10(2) = %f\n", exp10(2.));
printf("exp10(4) = %f\n", exp10(4.));
printf("exp10(8) = %f\n", exp10(8.));
return 0;
}
Gives me:
exp10(-4) = -1.996864
exp10(-1) = -1.996864
exp10(0) = -1.996864
exp10(1) = -1.996864
exp10(2) = -1.996864
exp10(4) = -1.996864
exp10(8) = -1.996865
And with un-commented part:
exp10(x) = 1.000000
exp10(-4) = 1.000000
exp10(-1) = 1.000000
exp10(0) = 1.000000
exp10(1) = 1.000000
exp10(2) = 1.000000
exp10(4) = 1.000000
exp10(8) = 1.000000
glibc is libc-2.3.2
kernel is linux-2.4.20
gcc is 3.3 20030226 (prerelease) (SuSE Linux)
--
Summary: exp10 gives nonsense results
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P3
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: fabian at fs-maphy dot uni-hannover dot de
CC: glibc-bugs at sources dot redhat dot com
GCC host triplet: i486-suse-linux
GCC target triplet: i686
http://sources.redhat.com/bugzilla/show_bug.cgi?id=403
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.