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/2008-January/075884.html below:

[Python-Dev] Return type of round, floor, and ceil in 2.6

[Python-Dev] Return type of round, floor, and ceil in 2.6Raymond Hettinger python at rcn.com
Fri Jan 4 23:45:34 CET 2008
[GvR to Tim]
> Do you have an opinion as to whether we should 
> adopt round-to-even at all (as a default)?

For the sake of other implementations (Jython, etc) and for ease of reproducing the results with other tools (Excel, etc), the simplest choice is int(x+0.5).  That works everywhere, it is easy to explain, it runs fast, and it is not hard to get right.

my two cents,

Raymond
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