From the previous thread:
I would say f32
and f64
have a (strict) partial order. Numbers compare as expected, −∞ < 0 < ∞, NaN ≮ NaN. But the <=
and >=
operators can't behave like a non-strict partial order because NaN != NaN
.
I would say the IEEE floats in mathematical terms have
- a strict partial order
in combination with
- an (independent) partial equivalence relation.
And yeah, it is kinda funny that PartialOrd
was likely introduced because of IEEE 754. Or were there other reasons?
I'm not sure what SQL's comparison regarding NULL
is in mathematical terms. I guess it'd require some exotic three-valued logic.
Edit: Sorry to have pulled this over to the new thread. I wasn't sure what to do. @steffahn gave a nice(er) answer in the other thread.