Re: [xml] Getting crazy with float parsing
- From: Aleksey Sanin <aleksey aleksey com>
- To: veillard redhat com
- Cc: 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:14:01 -0700
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]