The non-associativity isn't just signed zeros: regular floating point addition and multiplication of positive numbers is not associative
from math import nextafter x = nextafter(1.0, 2.0) print((x+x)+1.0, x+(x+1.0)) x2 = nextafter(1.0, 0.0) print((x*x2)*x2, x*(x2*x2)) _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/GJDX7OMCR3MSGX3X5JFC6UGKRSYPGX6Y/ Code of Conduct: http://python.org/psf/codeofconduct/