This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/193] New: incorrect results from strtod, strtof
- From: "ciriaco at chimica dot uniba dot it" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 31 May 2004 14:59:24 -0000
- Subject: [Bug libc/193] New: incorrect results from strtod, strtof
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
in:
char StringToReal(String *s, double *d) {
char *a;
float f;
*d=strtod(s->rep,&a);
f=strtof(s->rep,&a);
f=strtof("0.2",&a);
return (a!=s->rep);
}
where s->rep="0.2"
*d is returned -1717986918
f is returned 5033165 both times
So, what does this mean?
I used gcc 3.2.2 as compiler.
--
Summary: incorrect results from strtod, strtof
Product: glibc
Version: 2.3.2
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: ciriaco at chimica dot uniba dot it
CC: glibc-bugs at sources dot redhat dot com
http://sources.redhat.com/bugzilla/show_bug.cgi?id=193
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.