Floating point ordering #
We choose to make Floating a linear order with ∀ x, nan ≤ x, though unfortunately this means
max can't propagate nan. We provide an Floating.max version which does.
@[irreducible]
Unlike Float, we don't worry about nan for our comparisons
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- x✝¹.instDecidableRelLt x✝ = id inferInstance
Equations
- x✝¹.instDecidableRelLe x✝ = id inferInstance
We define max so that Floating is a LinearOrder, though unfortunately this means
that it does not propagate nan correctly. Floating.max works better.
Floating is a partial order
Equations
- One or more equations did not get rendered due to their size.
@[simp]
Floating.max propagates nan (Max.max does not)
@[simp]
Floating.max propagates nan (Max.max does not)
Floating.max is associative
@[simp]
max_eq_left for Floating.max, if we're not nan
@[simp]
max_eq_right for Floating.max, if we're not nan
Additional facts about "naive" min and max (discarding single nans) #
Min.min propagates nans, and Max.max is already naive, so we only need to define naive_min.