A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2010-March/098559.html below:

[Python-Dev] Decimal & amp; lt; -& amp; gt; float comparisons in py3k.

[Python-Dev] Decimal & amp; lt; -& amp; gt; float comparisons in py3k. [Python-Dev] Decimal & amp; lt; -& amp; gt; float comparisons in py3k.Antoine Pitrou solipsis at pitrou.net
Fri Mar 19 19:53:26 CET 2010
Glenn Linderman <v+python <at> g.nevcal.com> writes:
> 
> So when a coder choose to use Decimal, it is because float is 
> inappropriate.  Because float is inappropriate, mixing Decimal and float 
> is inappropriate.  Having the language coerce implicitly, is 
> inappropriate.

I'm sorry but this is very dogmatic. What is the concrete argument against an
accurate comparison between floats and decimals?

> Comparisons need to be done with 
> full knowledge of the precision of the numbers.  The additional 
> information necessary to do so cannot be encoded in a binary operator.

This doesn't have anything to do with the mixing of floats and decimals, though,
since it also applies to unmixed comparisons. Again, is there an argument
specific to mixed comparisons?


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