420
submitted 1 month ago by xkcdbot@lemmy.world to c/xkcd@lemmy.world

xkcd #3228: Day Counter

Title text:

It has been −2,147,483,648 days since our last integer overflow.

Transcript:

Transcript will show once it’s been added to explainxkcd.com

Source: https://xkcd.com/3228/

explainxkcd for #3228

you are viewing a single comment's thread
view the rest of the comments
[-] abcd@feddit.org 2 points 1 month ago

This one hits deep. One of my first more complicated projects was a driver for a device that counted a lot of values. Imagine an energy meter.

At the beginning I thought about writing code to create my own type since I was limited to uint32 as the biggest on board type. To spare some work I quickly decided to use a float type for the first time without thinking much about it (I usually use fixed point integers for everyday work)

Way into the project I thought about what happens, when the actual value is gigantic and I try to add a very small number. After thinking about it I realized that nothing happens. So my counter would stop working. I changed everything and never used a floating point number again in my life I 🤣

this post was submitted on 03 Apr 2026
420 points (99.5% liked)

xkcd

16520 readers
44 users here now

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

founded 3 years ago
MODERATORS