News for hackers. Stuff that matters.
Re:The state of SIMD in Rust in 2025 by imtringued on Thursday November 06, 2025 @04:51AM (#45833357)
https://play.rust-lang.org/?version=stable&mode=debug&editio...

You're supposed to do (a+b) to demonstrate the effect, because floating point subtraction that results in a number near zero is sensitive to rounding (worst case, a non-zero number gets you a zero number), which can introduce a huge error when a and b are very similar numbers.

Re:The state of SIMD in Rust in 2025 by jcranmer on Thursday November 06, 2025 @09:59AM (#45835985)
When you go from (a + b) + c to a + (b + c), you're invoking the associative property, not the commutative property.

The confusion between associativity and commutativity is the entire point of this thread!