Comment by simonask
20 hours ago
You mean ±9,007,199,254,740,993.0 for 64-bit floats. :-)
For other curious readers, these are one beyond the largest integer values that can be represented accurately. In other words, the next representable value away from zero after ±16,777,216.0 is ±16,777,218.0 in 32 bits -- the value ±16,777,217.0 cannot be represented, and will be rounded somewhat hand-wavingly (usually towards zero).
Precision rounding is one of those things that people often overlook.
No comments yet
Contribute on Hacker News ↗