3 ms·
Yup, because of the imprecision of floating points, cannot just assume that “(a + c) + (b + d)” is the same as “a + b + c + d”. It would be pretty ironic if at
by stingraycharles 1y ago
Yup, because of the imprecision of floating points, cannot just assume that “(a + c) + (b + d)” is the same as “a + b + c + d”.
It would be pretty ironic if at some point fixed point / bignum implementations end up being faster because of this.
- anthk 1y agoThey are, just check anything fixed-point for the 486SX vs anything floating under a 486DX. It's faster scaling and sum and print the desired precision than operating on floats.
- stingraycharles 1y agoIs that also the case for modern architectures? Eg is there SIMD fixed precision?
- einpoklum 1y agoI wonder... couldn't there just be some library type for this, e.g. `associative::float` and `associative::doube` and such (in C++ terms), so that compilers can ignore non-associativity for actions on values of these types? Or attributes one can place on variables to force assumption of associativity?