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/075913.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.6Daniel Stutzbach daniel at stutzbachenterprises.com
Sun Jan 6 02:22:20 CET 2008
On Jan 4, 2008 1:31 PM, Tim Peters <tim.peters at gmail.com> wrote:
> Curiously, round-to-nearest
> can be unboundedly more expensive to implement in some obscure
> contexts when floats can have very large exponents (as they can in
> Python's "decimal" module -- this is why the proposed decimal standard
> allows operations like "remainder-near" to fail if applied to inputs
> that are "too far apart":

Just to be clear, this problem doesn't come up in round(), right?

Because in round(), you just test the evenness of the last digit
computed.  There is never a need to compute extra digits just to
perform the test.

-- 
Daniel Stutzbach, Ph.D.             President, Stutzbach Enterprises LLC
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