we all know floating point numbers can be treacherous, but what are specific examples of when they've betrayed you?

so far I have:

* money calculations where you need to get the exact correct answer
* twitter's tweet IDs are bigger than 2^53 and can't be represented as a Javascript number, you have to use a string
* implementing numerical algorithms (like matrix multiplication) (I've never done this)

Follow

@b0rk (C/C++) Code that works fine in one environment doesn't work in another because the second environment had floating point exceptions enabled in the CPU.

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!