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 Attempting to convert a bezier curve into lines, but the points are so close together that the "midpoint" is equal to one of your original points and you infinitely recurse.

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!