Re: [xml] Getting crazy with float parsing


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.


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

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.


xml mailing list, project page
xml gnome org

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