> (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.
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