Equivs for Doubles.
| Supertypes | |
|---|---|
| Self type |
| Companion | class |
|---|
An equivalence for Doubles which is consistent with IEEE specifications.
Because the behaviour of Doubles 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 Double: 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.
| See also | |
|---|---|
| Companion | object |
| Companion | class |
|---|
An equivalence for Doubles which is reflexive (treats all NaNs as equivalent), and treats -0.0 and 0.0 as not equivalent; it behaves the same as java.lang.Double.compare.
Because the behaviour of Doubles 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 Double: 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.
| See also | |
|---|---|
| Companion | object |
© 2002-2022 EPFL, with contributions from Lightbend.
Licensed under the Apache License, Version 2.0.
https://scala-lang.org/api/3.2.0/scala/math/Equiv$$Double$.html