diff options
author | Dominik Gruntz <dominik.gruntz@fhnw.ch> | 2012-07-19 11:02:46 +0200 |
---|---|---|
committer | Dominik Gruntz <dominik.gruntz@fhnw.ch> | 2012-07-19 11:19:35 +0200 |
commit | 4324282f27f2dadf90213882d3f5f346940bc0fd (patch) | |
tree | cf34d4655e11c618c6c215ecef1539ced7889344 | |
parent | d9b65592df28e8c9655b52c0265f499d757617ba (diff) | |
download | scala-4324282f27f2dadf90213882d3f5f346940bc0fd.tar.gz scala-4324282f27f2dadf90213882d3f5f346940bc0fd.tar.bz2 scala-4324282f27f2dadf90213882d3f5f346940bc0fd.zip |
Removes Float.Epsilon and Double.Epsilon
Float.Epsilon and Double.Epsilon contain the wrong value. Epsilon
should be an upper bound on the relative error due to rounding
errors in floating point arithmetic, i.e. it is 1/2 ULP (unit in
the last position) which is 2^(-24) for Float and 2^(-53) for Double.
This was discussed in detail in https://issues.scala-lang.org/browse/SI-3791
and it was decided to deprecate Epsilon for 2.9 and to remove it for 2.10
and to reintroduce it with the correct value for 2.11.
See also the discussion (and comment from Martin) on
https://groups.google.com/forum/?fromgroups#!topic/scala-internals/m763WjBdfyo
-rw-r--r-- | src/library/scala/Double.scala | 3 | ||||
-rw-r--r-- | src/library/scala/Float.scala | 3 |
2 files changed, 0 insertions, 6 deletions
diff --git a/src/library/scala/Double.scala b/src/library/scala/Double.scala index 2ff46c433d..510de92a2a 100644 --- a/src/library/scala/Double.scala +++ b/src/library/scala/Double.scala @@ -370,9 +370,6 @@ object Double extends AnyValCompanion { final val PositiveInfinity = java.lang.Double.POSITIVE_INFINITY final val NegativeInfinity = java.lang.Double.NEGATIVE_INFINITY - @deprecated("use Double.MinPositiveValue instead", "2.9.0") - final val Epsilon = MinPositiveValue - /** The negative number with the greatest (finite) absolute value which is representable * by a Double. Note that it differs from [[java.lang.Double.MIN_VALUE]], which * is the smallest positive value representable by a Double. In Scala that number diff --git a/src/library/scala/Float.scala b/src/library/scala/Float.scala index bd7a07fece..b9c116da0b 100644 --- a/src/library/scala/Float.scala +++ b/src/library/scala/Float.scala @@ -370,9 +370,6 @@ object Float extends AnyValCompanion { final val PositiveInfinity = java.lang.Float.POSITIVE_INFINITY final val NegativeInfinity = java.lang.Float.NEGATIVE_INFINITY - @deprecated("use Float.MinPositiveValue instead", "2.9.0") - final val Epsilon = MinPositiveValue - /** The negative number with the greatest (finite) absolute value which is representable * by a Float. Note that it differs from [[java.lang.Float.MIN_VALUE]], which * is the smallest positive value representable by a Float. In Scala that number |