This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/193] New: incorrect results from strtod, strtof


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]