Float (original) (raw)
scala.math.Equiv.Float
Equiv
s for Float
s.
Attributes
Source
Graph
Supertypes
Self type
Members list
An equivalence for Float
s which is consistent with IEEE specifications.
An equivalence for Float
s which is consistent with IEEE specifications.
Because the behaviour of Float
s specified by IEEE is not consistent with behaviors required of an equivalence relation for NaN
(it is not reflexive), there are two equivalences defined for Float
: StrictEquiv
, which is reflexive, and IeeeEquiv
, which is consistent with IEEE spec and floating point operations defined in scala.math.
This equivalence may be preferable for numeric contexts.
Attributes
See also
Companion
Source
Supertypes
Known subtypes
An equivalence for Float
s which is reflexive (treats all NaN
s as equivalent), and treats -0.0
and 0.0
as not equivalent; it behaves the same as java.lang.Float.compare.
An equivalence for Float
s which is reflexive (treats all NaN
s as equivalent), and treats -0.0
and 0.0
as not equivalent; it behaves the same as java.lang.Float.compare.
Because the behaviour of Float
s specified by IEEE is not consistent with behaviors required of an equivalence relation for NaN
(it is not reflexive), there are two equivalences defined for Float
: StrictEquiv
, which is reflexive, and IeeeEquiv
, which is consistent with IEEE spec and floating point operations defined in scala.math.
This equivalence may be preferable for collections.
Attributes
See also
Companion
Source
Supertypes
Known subtypes
In this article