A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-September/155332.html below:

[Python-Dev] Change in Python 3's "round" behavior

[Python-Dev] Change in Python 3's "round" behavior [Python-Dev] Change in Python 3's "round" behaviorGreg Ewing greg.ewing at canterbury.ac.nz
Thu Sep 27 01:55:07 EDT 2018
jab at math.brown.edu wrote:
> I understand from
> https://github.com/cosmologicon/pywat/pull/40#discussion_r219962259
> that "to always round up... can theoretically skew the data"

*Very* theoretically. If the number is even a whisker bigger than
2.5 it's going to get rounded up regardless:

 >>> round(2.500000000000001)
3

That difference is on the order of the error you expect from
representing decimal fractions in binary, so I would be surprised
if anyone can actually measure this bias in a real application.

>>It is a common knowledge that rounding half-to-even is what users want in most cases
>
> I don't think that's common knowledge; seems like citation needed?

It's not common enough for me to have heard of it before.

(BTW, how do you provide a citation for "common knowledge"?-)

-- 
Greg


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4