Re: [xml] Getting crazy with float parsing



Richard Jinks wrote:

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

Trio can be adapted to do whatever is logically possible.

When I made my rounding workaround, I focussed on the number 39413.80
because the relative error is five orders of magnitude (1E5) higher
than that of 2/3. I felt that errors on that scale were more important.

If I remove the rounding workaround which started this discussion,
then trio outputs the following

  39413.800000000002910406828028
      1.399999999999999926684424
      0.666666666666666644466646

Notice that the relative error less than that of MSC in all three
cases, and less than Linux glibc in the two last cases.

If somebody knows how to improve the accuracy further, then I an open
to suggestions.

If you guys can settle on the requirements, I can make the necessary
code changes.



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