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/2010-March/098628.html below:

[Python-Dev] Mixing float and Decimal -- thread reboot

[Python-Dev] Mixing float and Decimal -- thread rebootGuido van Rossum guido at python.org
Sun Mar 21 00:52:42 CET 2010
On Sat, Mar 20, 2010 at 4:46 PM, Mark Dickinson <dickinsm at gmail.com> wrote:
> On Sat, Mar 20, 2010 at 11:20 PM, Greg Ewing
> <greg.ewing at canterbury.ac.nz> wrote:
>> * Decimal and float really belong side-by-side in the
>> tower, rather than one above the other. Neither of them is
>> inherently any more precise or exact than the other.
>
> Except that float is fixed-width (typically 53 bits of precision),
> while Decimal allows a user-specified, arbitrarily large, precision;
> so in that sense the two floating-point types aren't on an equal
> footing.

But this doesn't really help deciding which should be positioned at
the end does it? Both Fraction and Decimal can represent every float
value (barring NaN/Inf). I wonder if we need to look at use cases or
see what other languages do for guidance.

-- 
--Guido van Rossum (python.org/~guido)
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