this post was submitted on 12 Mar 2025
150 points (100.0% liked)

xkcd

10288 readers
180 users here now

A community for a webcomic of romance, sarcasm, math, and language.

founded 2 years ago
MODERATORS
 

It does come at the small cost of a LOT more off-by-40-or-50 errors.

https://explainxkcd.com/3062/

top 5 comments
sorted by: hot top controversial new old
[–] [email protected] 15 points 1 month ago (1 children)

wait, but what about off-by-39-or-51 errors?

[–] [email protected] 1 points 1 month ago

And the off-by-41-or-49 errors.

[–] [email protected] 6 points 1 month ago

In this language you would account for this behavior so all comparisons and lookups would be designed to be valid for the increased range. To do this you'd have to record integers in increments of 10, so there would be no (or very few) off-by-40-to-50 errors, or off-by-1 errors, but there would be off-by-10 errors.

[–] [email protected] 1 points 1 month ago

but therewill be occurences when you add/subtract the same number when writing and reading an int, so it is not entirely eliminated

[–] [email protected] 1 points 1 month ago

Welp, guess it's time for:

for(float i = 0.0; ....) {...}