Re: [xml] Getting crazy with float parsing



Team,

This discussion is going to far. Since my early days with the IBM 1130
(1970, 16Kb memory) we fight with floating point rounding errors. There is
NO generic solution.

Why not use a portable floating point BCD library? XPath is not computation
intensive and we can sleep in peace.

Cheers,

Nilo
----- Original Message -----
From: "Igor Zlatkovic" <izlatkovic daenet de>
To: "Richard Jinks" <cyberthymia yahoo co uk>; <xml gnome org>
Sent: sexta-feira, 10 de maio de 2002 06:21
Subject: RE: [xml] Getting crazy with float parsing


But if Trio isn't used, then some other generic floating
point library is
needed.
As I've found out testing XPath expressions, the native
support for floats
provided by the compilers is highly variable especially with (but not
limited to)
+ / - Infinity and NaN. A library like Trio is required to provide
consistancy
across different compilers and platforms

This is what trio is doing in libxml now.

Can Trio not be fixed to improve it's accuracy rather than removing it
altogether?

I would not remove it altogether, it does a good job regarding
Infinities and NaNs. Its floating-point -> string accuracy can probably
be improved. However, I observe that people prefer IEEE 754 format to
any other alternative, no matter how much more accurate that alternative
may be.

Igor

_______________________________________________
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]