News for hackers. Stuff that matters.
Re:FastDoubleParser: Java port of Daniel Lemires fast_double... by titzer on Monday March 22, 2021 @10:40PM (#26550398)
That doesn't cover the entire space of possibilities, because the input can be an arbitrarily long decimal number. A correct implementation must (in the limit) expand the entire binary representation of that number and correctly round (using round-to-nearest, ties-to-even), even if the tie-breaking bit is a million places down.
Re:FastDoubleParser: Java port of Daniel Lemires fast_double... by cozzyd on Monday March 22, 2021 @10:51PM (#26550464)
Is there a provable limit to the maximum depth of the tie-breaking bit? Otherwise sounds like a potential DOS vector?
Re:FastDoubleParser: Java port of Daniel Lemires fast_double... by titzer on Tuesday March 23, 2021 @12:15AM (#26551043)
It's only limited by the number of decimal digits (after the decimal point) input by the user; computing and storing that is linear in the input size. It's no more a DOS vector than just an enormous source file.