• ranzispa@mander.xyz
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 months ago

    Floating point errors are what eventually convinced God to make the universe the way it is. The initial plan was to have all properties be continuous, but that resulted in many floating point errors. That’s when he said: fuck it, quantum states are discrete.

  • abcd@feddit.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months 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 🤣