On 3/09/21 8:11 pm, Christian Gollwitzer wrote:
Unless you have special numbers like NaN or signed zeros etc., a+b=b+a and a*b=b*a holds also for floats.

The only exception I'm aware of is for NaNs, and it's kind of pendantic:
you can't say that x + NaN == NaN + x, but only because NaNs never
compare equal. You still get a NaN either way, so for all practical
purposes it's commutative.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to