Deep comparison of dicts - cmp() versus ==?
Rustom Mody
rustompmody at gmail.com
Thu Mar 19 23:47:32 EDT 2015
On Friday, March 20, 2015 at 9:05:19 AM UTC+5:30, Chris Angelico wrote:
> On Fri, Mar 20, 2015 at 2:27 PM, Rustom Mody wrote:
> > Numbers (not complex) satisfy the trichotomy law: ie for any 2 numbers x,y:
> > x < y or x > y o x = y
>
> Real numbers, yes, and integers in most computer representations, but
> not IEEE floating point. Be careful of that distinction; we're talking
> about computers here, not mythical numbers.
A putative set that claims to be some-kind-of-numbers and has an element
that is Not-A-Number looks more mythical/mystical/Zen-ish than classical
math numbers.
IOW: float is a poor approximation to ℝ.
Most of us laymen use it because its an approximation that works (kinda).
Numerical analysts earn their keep because of the 'poor'
Not too many people are interested in float independent of ℝ except perhaps
hardware designers who need to design respecting the IEEE standard.
More information about the Python-list
mailing list