Re: [xml] Getting crazy with float parsing
- From: Aleksey Sanin <aleksey aleksey com>
- To: Aleksey Sanin <aleksey aleksey com>
- Cc: veillard redhat com, Bjorn Reese <breese mail1 stofanet dk>, "'xml gnome org'" <xml gnome org>
- Subject: Re: [xml] Getting crazy with float parsing
- Date: Sun, 05 May 2002 11:15:58 -0700
This is the link that describes it
http://www.math.grin.edu/~stone/courses/fundamentals/IEEE-reals.html
Aleksey.
Aleksey Sanin wrote:
Daniel,
You are not turning crazy :) It is a known problem with float numbers
that has origin in the way float numbers are stored in memory. For
example,
the following program
float a = 0.000;
if(a == 0.00000) {
printf("Hello!\n");
}
will probably never print "Hello!"
Aleksey.
Daniel Veillard wrote:
Hi Bjorn,
I have spent 2 hours on bug 80798
http://bugzilla.gnome.org/show_bug.cgi?id=80798
and I'm starting to wonder if I'm simply turning crazy.
I cannot get xmlXPatythStringEvalNumber to read "39413.80" as such
and not as 39413.800000000003 or some similary biased value, whatever
trick I play. Any idea ? Would trio handle this correctly (assuming
the string has
been first checked to be of the right format) ?
this really drive me nuts,
Daniel
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]