[Python-ideas] statistics module in Python3.4

Stephen J. Turnbull stephen at xemacs.org
Fri Jan 31 06:56:39 CET 2014


Steven D'Aprano writes:

 > Floats violate several of the fundamental rules of mathematics,
 > e.g. addition is not commutative:

AFAIK it is.

 > py> 1e19 + (-1e19 + 0.1) == (1e19 + -1e19) + 0.1
 > False

This is a failure of associativity, not commutativity.  Associativity
is in many ways a more fundamental property.


More information about the Python-ideas mailing list