Well, true, I'm not in favor of rearranging +/ either. The dangers of floating point don't include nondeterminism, unless you make them.
However, I also think matrix products have it worse. Numbers with widely varying exponents are a bit of an edge case. But when you're multiplying a few large matrices together they can show up naturally, so I expect it's not so rare to have a product that's numerically stable in one direction and not in the other. Marshall On Mon, Jan 09, 2023 at 05:52:34PM -0600, Omar Antolín Camarena wrote: > But that's just normal floating non-associativity. It happens even for > addition of "integers": > > 1 + (_1e19 + 1e19) > 1 > (1 + _1e19) + 1e19 > 0 > > People using floating point are probably aware of the dangers or at least > should be. > > -- > Omar > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm