4 ms·
Isn't that more of an associativity problem than a commutativity problem, though? 1.0 + 1e-16 == 1e-16 + 1.0 == 1.0 as well as 1.0 + 1e-15 == 1e-15 + 1.0 == 1.
by mike_hock 7y ago
Isn't that more of an associativity problem than a commutativity problem, though?
1.0 + 1e-16 == 1e-16 + 1.0 == 1.0
as well as 1.0 + 1e-15 == 1e-15 + 1.0 == 1.000000000000001
however (1.0 + (1e-16 + 1e-16)) == 1.0 + 2e-16 == 1.0000000000000002,
whereas ((1.0 + 1e-16) + 1e-16) == 1.0 + 1e-16 == 1.0