This page is no longer maintained — Please continue to the home page at www.scala-lang.org

To all committers: upcoming 2.9.0 RC1

56 replies
rytz
Joined: 2008-07-01,
User offline. Last seen 45 weeks 5 days ago.
Re: To all committers: upcoming 2.9.0 RC1
I agree as well that MinValue should be kept. But I still agree with the initialpoint of http://lampsvn.epfl.ch/trac/scala/ticket/3791, that "Epsilon" should be renamed to something else, possibly "MinPositiveValue".
Lukas
On Tue, Feb 15, 2011 at 14:35, martin odersky <martin.odersky@epfl.ch> wrote:
On Tue, Feb 15, 2011 at 2:20 PM, Daniel Sobral <dcsobral@gmail.com> wrote:
> Welcome to Scala version 2.8.1.final (Java HotSpot(TM) 64-Bit Server VM,
> Java 1.6.0_22).
> Type in expressions to have them evaluated.
> Type :help for more information.
>
> scala> Double.MinValue
> res0: Double = -1.7976931348623157E308
>
> scala> java.lang.Double.MIN_VALUE
> res3: Double = 4.9E-324
>
> Welcome to Scala version 2.9.0.r24214-b20110209134919 (Java HotSpot(TM)
> 64-Bit Server VM, Java 1.6.0_22).
> Type in expressions to have them evaluated.
> Type :help for more information.
>
> scala> Double.MinValue
> warning: there were 1 deprecation warnings; re-run with -deprecation for
> details
> res0: Double = -1.7976931348623157E308
>
> So, deprecation was introduced after 2.8.1.
>
Got it, thanks! I agree we should revert then.

Jason Zaugg
Joined: 2009-05-18,
User offline. Last seen 38 weeks 5 days ago.
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.

soc
Joined: 2010-02-07,
User offline. Last seen 34 weeks 5 days ago.
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

Ruediger Keller 2
Joined: 2010-04-30,
User offline. Last seen 42 years 45 weeks ago.
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

Jason Zaugg
Joined: 2009-05-18,
User offline. Last seen 38 weeks 5 days ago.
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

adriaanm
Joined: 2010-02-08,
User offline. Last seen 31 weeks 4 days ago.
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 the
disproportionate amount of discussion that these simple little choices
have inspired.
http://www.haskell.org/haskellwiki/Wadler's_Law
adriaan

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland