[prev in list] [next in list] [prev in thread] [next in thread] 

List:       e-lang
Subject:    Re: [e-lang] Math.min() and Math.max()
From:       "Mark S. Miller" <markm () caplet ! com>
Date:       2003-11-13 16:47:32
[Download RAW message or body]

At 05:31 AM 11/13/2003  Thursday, Kevin Reid wrote:

>Chris Hibbert <hibbert@mydruthers.com> wrote:
>
>> ? def Math := <import:java.lang.StrictMath>
><snip>
>> ? Math.min(3.2, 2.3)
>> # problem: <IllegalArgumentException: Ambiguous overload on class
>> org.erights.e.elib.prim.StaticMaker: min(double, double) vs min(float,
>> float)>
><snip>
>> Is there a way to specify a particular java method overloading?
>
>E.call(Math, "min(double, double)", [3.2, 2.3])

Yes. In addition, as seen at 
http://www.erights.org/javadoc/java/lang/Double.html , many of the static 
methods of Math have been turned into instance methods of float64 values in E.

    ? 3.2.max(2.3)
    # value: 3.2

In light of your message, I now notice a bug: I am currently using Math, but 
need to be using StrictMath in order to have a deterministic spec. 
Oops, I'll change that. Thanks.


----------------------------------------
Text by me above is hereby placed in the public domain

        Cheers,
        --MarkM

_______________________________________________
e-lang mailing list
e-lang@mail.eros-os.org
http://www.eros-os.org/mailman/listinfo/e-lang
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic