- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
To all committers: upcoming 2.9.0 RC1
Tue, 2011-02-15, 14:57
#52
Re: To all committers: upcoming 2.9.0 RC1
On Tue, Feb 15, 2011 at 2:41 PM, Lukas Rytz wrote:
> I agree as well that MinValue should be kept. But I still agree with the
> initial
> point of http://lampsvn.epfl.ch/trac/scala/ticket/3791, that "Epsilon"
> should
> be renamed to something else, possibly "MinPositiveValue".
> Lukas
I've reopened http://lampsvn.epfl.ch/trac/scala/ticket/3791#comment:14
to track this.
Tue, 2011-02-15, 15:47
#53
Re: To all committers: upcoming 2.9.0 RC1
Hi everyone!
> Essentially my position is: 2.9 should behave like 2.8.1 here.
You just saved my day! :-)
>> I agree as well that MinValue should be kept. But I still agree with the
>> initial point of http://lampsvn.epfl.ch/trac/scala/ticket/3791,
>> that "Epsilon" should be renamed to something else, possibly
>> "MinPositiveValue".
>
> I've reopened http://lampsvn.epfl.ch/trac/scala/ticket/3791#comment:14
> to track this.
Regarding Epsilon:
I still dislike the name MinPositiveValue.
It is just my subjective taste but I think the name is still too
similar to MinValue/MaxValue. I would prefer having something which
wouldn't look as similar ...
Other than the ones already proposed, imho the name "Epsilon" isn't
that bad, if
+ explicit documentation what the value should be
+ mentioning that the documentation was wrong and was fixed in 2.9
(+ adding some @migration warning, informing the user that the
documentation was changed, but not the value).
is added to it.
Thanks and bye!
Simon
Tue, 2011-02-15, 17:17
#54
Re: To all committers: upcoming 2.9.0 RC1
Just to add my 2 cents to this discussion:
I hope everyone here is aware that the discussed constant epsilon, or
whatever its name should be, is very limited in its use.
Due to the representation of doubles as floating point numbers, the
"constant" epsilon differs with the number used for reference.
Therefore the methods ulp, nextAfter and nextUp are defined on
java.lang.Math. IMHO these are a much more sane alternative to the
discussed constant epsilon, which will in 99.9% of the time not be
want you need. Using the proposed epsilon from Apache Commons Math:
Welcome to Scala version 2.8.0.final (Java HotSpot(TM) Client VM, Java
1.6.0_23).
Type in expressions to have them evaluated.
Type :help for more information.
scala> 1.0 + 1.1102230246251565E-16 == 1.0
res0: Boolean = true
How cool is that? IMHO epsilon should just be deprecated and removed
as soon as possible.
Regards,
Ruediger
Tue, 2011-02-15, 17:27
#55
Re: To all committers: upcoming 2.9.0 RC1
On Tue, Feb 15, 2011 at 5:13 PM, Ruediger Keller
wrote:
> I hope everyone here is aware that the discussed constant epsilon, or
> whatever its name should be, is very limited in its use.
>
> Due to the representation of doubles as floating point numbers, the
> "constant" epsilon differs with the number used for reference.
>
> Therefore the methods ulp, nextAfter and nextUp are defined on
> java.lang.Math. IMHO these are a much more sane alternative to the
> discussed constant epsilon, which will in 99.9% of the time not be
> want you need. Using the proposed epsilon from Apache Commons Math:
>
> Welcome to Scala version 2.8.0.final (Java HotSpot(TM) Client VM, Java
> 1.6.0_23).
> Type in expressions to have them evaluated.
> Type :help for more information.
>
> scala> 1.0 + 1.1102230246251565E-16 == 1.0
> res0: Boolean = true
>
> How cool is that? IMHO epsilon should just be deprecated and removed
> as soon as possible.
Yes, it will be deprecated.
It used to the confusingly named hold java.lang.Double.MinValue. That
value will be now available under the name MinPositiveValue.
Or maybe it should just be removed altogether, based on the
disproportionate amount of discussion that these simple little choices
have inspired.
-jason
Tue, 2011-02-15, 17:37
#56
Re: To all committers: upcoming 2.9.0 RC1
On Tue, Feb 15, 2011 at 5:22 PM, Jason Zaugg <jzaugg@gmail.com> wrote:
Or maybe it should just be removed altogether, based on thehttp://www.haskell.org/haskellwiki/Wadler's_Law
disproportionate amount of discussion that these simple little choices
have inspired.
adriaan
Lukas
On Tue, Feb 15, 2011 at 14:35, martin odersky <martin.odersky@epfl.ch> wrote: