| ▲ | adastra22 10 hours ago | ||||||||||||||||
It is not, due to precision. Consider a=1.00000, b=-0.99999, and c=0.00000582618. | |||||||||||||||||
| ▲ | jcranmer 9 hours ago | parent | next [-] | ||||||||||||||||
No, the two evaluations will give you exactly the same result: https://play.rust-lang.org/?version=stable&mode=debug&editio... IEEE 754 operations are nonassociative, but they are commutative (at least if you ignore the effect of NaN payloads). | |||||||||||||||||
| |||||||||||||||||
| ▲ | zygentoma 10 hours ago | parent | prev | next [-] | ||||||||||||||||
You still need to specify an evaluation order … | |||||||||||||||||
| ▲ | immibis 9 hours ago | parent | prev [-] | ||||||||||||||||
Does (1.00000+-0.99999)+0.00000582618 != 0.00000582618+(-0.99999+1.00000) ? This would disprove commutativity. But I think they're equal. | |||||||||||||||||