working of round()

Robert Kern robert.kern at gmail.com
Sun Apr 15 23:47:51 EDT 2007


Steven Bethard wrote:

> I'm not sure why you would have expected 2.62 for the latter when::
> 
>      >>> 5.25 / 2
>      2.625

Round-to-nearest-even is a valid, and oft-recommended rounding mode for numbers
exactly halfway between two round numbers.

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