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-June/045556.html below:

[Python-Dev] Comparing heterogeneous types

[Python-Dev] Comparing heterogeneous types [Python-Dev] Comparing heterogeneous typesAndrew Koenig ark-mlist at att.net
Thu Jun 24 11:29:11 EDT 2004
> (For other operations, I still want to see e.g. long+float to return a
> float rather than a long -- you *have* to do it this way for obvious
> reasons when the values are relatively small, e.g. consider 1 + 0.5.)

That is not unreasonable behavior.  However, I wonder if it might be
possible to do better by yielding a long in those cases where the value is
so large that the LSB of a float would be >=1.  By doing so, it might be
possible to guarantee that no precision is needlessly lost--analogously to
having the result of int addition yield a long when an int cannot contain
the result exactly.

Please understand that I am not advocating this strategy for arithmetic the
way I am for comparison, because I am not sure about its formal properties.
I'm going to think about it for a while; depending on my conclusions, I may
change my opinion later.



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