On Apr 15, 8:06 pm, [EMAIL PROTECTED] wrote:
> Does round() always perfectly return the output expected or are there
> some artifacts which don't allow perfect functionality
>
> Using python 2.5:
>
> >>> round(12.234, 2)
> 12.23
> >>> round(12.234, 3)
> 12.234
> >>> round(12.234, 1)
> 12.19
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
[EMAIL PROTECTED] wrote:
> Does round() always perfectly return the output expected or are there
> some artifacts which don't allow perfect functionality
>
> Using python 2.5:
round(12.234, 2)
> 12.23
round(12.234, 3)
> 12.234
round(12.234, 1)
> 12.199
>
> but was expec
[EMAIL PROTECTED] wrote:
> Does round() always perfectly return the output expected or are there
> some artifacts which don't allow perfect functionality
>
> Using python 2.5:
round(12.234, 2)
> 12.23
round(12.234, 3)
> 12.234
round(12.234, 1)
> 12.199
>
> but was expec
Does round() always perfectly return the output expected or are there
some artifacts which don't allow perfect functionality
Using python 2.5:
>>> round(12.234, 2)
12.23
>>> round(12.234, 3)
12.234
>>> round(12.234, 1)
12.199
>>>
but was expecting 12.2
Also, for round(x,n), can't 'x'