Get the latest tech news

Floats Don't Agree with Themselves


Same code, same input, different answer. A polygon-overlap test passed locally and failed on the server because LLVM folded a multiply-add into FMA on x86 and not on WASM. Here's a 2D geometry library that uses no floats — i64 coordinates, i128 cross products, bit-exact across architectures.

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of floats

floats

Related news:

News photo

Faster Argmin on Floats

News photo

Converting Integers to Floats Using Hyperfocus (2022)

News photo

Most ints are not floats