HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Is < binary relation a strict partial order on IEEE doubles?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
orderdoublesieeebinarypartialstrictrelation

Problem

To me it looks that it is:

  • irreflexivity: NaN



  • transitivity: if a



  • asymmetry: if a



However, it cannot be extended to non-strict partial ordering <= because there's no (reflexive) equality for doubles (NaN != NaN).

Solution

Yes, it is. (Though you need to consider signed zero as well as NaNs.) For extra confirmation:

So, the floating-point operator< does not form weak order and therefore does not form a total order. It is, however, a partial order.

However, it cannot be extended to non-strict partial ordering <= because there's no (reflexive) equality for doubles (NaN != NaN).

It can be extended, but <= as defined by IEEE isn't that extension.

Context

StackExchange Computer Science Q#50991, answer score: 4

Revisions (0)

No revisions yet.