Gabriel Genellina wrote:
Python doesn't require __add__ to be associative, so this should not be used as 
a general sum replacement. But if you know that you're adding floating point 
numbers you can use whatever algorithm best fits you. Or use numpy arrays; I 
think they implement Kahan summation or a similar algorithm.

No, we do a straightforward sum, too. Less magic in the default case.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to