Re: [xml] Getting crazy with float parsing


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) {
will probably never print "Hello!"


Daniel Veillard wrote:

 Hi Bjorn,

I have spent 2 hours on bug 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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]