|
| ▲ | 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). |
| |
| ▲ | dbdr an hour ago | parent [-] | | Is there a case involving NaN where they are not commutative? Do you mean getting a different bit-level representation of NaN? | | |
| ▲ | Remnant44 8 minutes ago | parent [-] | | In practical use for simd, various min/max operations. On Intel at least, they propagate nan or not based on operand order |
|
|
|
| ▲ | 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. |