Rounding a number to nearest even

Robert Kern robert.kern at gmail.com
Fri Apr 11 13:55:28 EDT 2008


cokofreedom at gmail.com wrote:

> Strange request though, why do you need it that way, because 2.5 is
> CLOSER to 3 than to 2...

Uhhh, no it isn't. (3 - 2.5) == (2.5 - 2)

-- 
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




More information about the Python-list mailing list