Debian – Truncating floats to int on x86 vs x86_64 has different rounding error
I stumbled upon a failing unit-test, that involves converting doubles to integers. The actual number that is converted is 1.234 * 1000., and the code basically boils down to: #include <iostream> #include <cstdint> int64_t deltatime(double numSeconds) { return (int64_t) (numSeconds…