public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/193] New: incorrect results from strtod, strtof
@ 2004-05-31 14:59 ciriaco at chimica dot uniba dot it
2004-05-31 15:12 ` [Bug libc/193] " schwab at suse dot de
0 siblings, 1 reply; 2+ messages in thread
From: ciriaco at chimica dot uniba dot it @ 2004-05-31 14:59 UTC (permalink / raw)
To: glibc-bugs
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libc/193] incorrect results from strtod, strtof
2004-05-31 14:59 [Bug libc/193] New: incorrect results from strtod, strtof ciriaco at chimica dot uniba dot it
@ 2004-05-31 15:12 ` schwab at suse dot de
0 siblings, 0 replies; 2+ messages in thread
From: schwab at suse dot de @ 2004-05-31 15:12 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From schwab at suse dot de 2004-05-31 15:12 -------
You need to include <stdlib.h> to get the declaration.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-31 15:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-31 14:59 [Bug libc/193] New: incorrect results from strtod, strtof ciriaco at chimica dot uniba dot it
2004-05-31 15:12 ` [Bug libc/193] " schwab at suse dot de
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).