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/2004-April/044411.html below:

[Python-Dev] Decimal data type issues

[Python-Dev] Decimal data type issuesTim Peters tim.one at comcast.net
Mon Apr 19 10:57:52 EDT 2004
[Edward Loper]
> ...
>    - I do believe that there will be use cases for exponents outside
>      this range.  Just because there's no physical quantities that are
>      reasonably measured with these numbers, doesn't mean that there
>      won't be abstract quantities that are reasonably measured with
>      huge numbers.

You don't have a real use case, Edward (if you did, you would have given it
by now <wink>).  YAGNI.  Note that GNU GMP's arbitrary-precision float types
also have bounds on exponent magnitude (but not on precision) -- this is
conventional.

>    - I don't believe that signaling an error when a number goes
>      outside this range will help catch any errors.  What type of
>      error are we expecting to catch here?

Overflow, and possibly underflow.  Typical when a correct iterative
algorithm is fed an input outside its radius of convergence, or an incorrect
iterative algorithm is fed anything.

>      If this is such a problem, then why doesn't long also have
>      a max/min?

For the same reason Decimal doesn't have a bound on precision:  exact
calculations can require any number of digits.  Exponents kick in when the
calculation becomes approximate (when precision is exceeded).


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