Equivs forFloats.
An equivalence forFloats which is consistent with IEEE specifications.
An equivalence forFloats which is consistent with IEEE specifications.
Because the behaviour ofFloats specified by IEEE is not consistent with behaviors required of an equivalence relation forNaN (it is not reflexive), there are two equivalences defined forFloat:StrictEquiv, which is reflexive, andIeeeEquiv, which is consistent with IEEE spec and floating point operations defined inscala.math.
This equivalence may be preferable for numeric contexts.
An equivalence forFloats which is reflexive (treats allNaNs as equivalent), and treats-0.0 and0.0 as not equivalent; it behaves the same asjava.lang.Float.compare.
An equivalence forFloats which is reflexive (treats allNaNs as equivalent), and treats-0.0 and0.0 as not equivalent; it behaves the same asjava.lang.Float.compare.
Because the behaviour ofFloats specified by IEEE is not consistent with behaviors required of an equivalence relation forNaN (it is not reflexive), there are two equivalences defined forFloat:StrictEquiv, which is reflexive, andIeeeEquiv, which is consistent with IEEE spec and floating point operations defined inscala.math.
This equivalence may be preferable for collections.