News for hackers. Stuff that matters.
Re:A useless infinite scroll experiment by adzm on Tuesday March 10, 2026 @04:02AM (#47320293)
Won't this lose precision as you near the limits of a double? Or is it using BigInt behind the scenes?
Re:A useless infinite scroll experiment by dolin_ch on Tuesday March 10, 2026 @04:27AM (#47320479)
It's just standard JS numbers (IEEE-754 doubles), not BigInt.

The distance is accumulated in millimeters, so even if someone somehow scrolled hundreds of kilometers we'd still be far below the 2^53 integer precision limit.

So precision loss shouldn't realistically happen.