This is the mail archive of the
mauve-discuss@sources.redhat.com
mailing list for the Mauve project.
Re: [classpath] Math.min
- To: Eric Blake <ebb9 at email dot byu dot edu>
- Subject: Re: [classpath] Math.min
- From: John Leuner <jewel at pixie dot co dot za>
- Date: Fri, 10 Aug 2001 20:56:34 +0000
- Cc: mauve-discuss at sources dot redhat dot com
- References: <BBEAIJPCAENOJFNNMPBIGENKCBAA.ebb9@email.byu.edu>
> Have you tried my recent patch to Mauve that allows direct comparison of
> floats and doubles, without resorting to String comparison? You should be
> able to write the tests like this:
>
> harness.check(Math.min(Double.NaN, 2.0), Double.NaN);
Hello Erik,
I wasn't paying attention (or I wasn't subscribed to the list yet), so I don't know anything about your patch. I'm using the latest CVS, is it in there?
John Leuner
> Original message [on classpath@gnu.org]:
>
> These mauve tests fail on my JVM:
>
> harness.check (Double.toString (Math.min (Double.NaN, 2.0)), "NaN");
>
> harness.check (Double.toString (Math.min (Double.NEGATIVE_INFINITY,
> Double.POSITIVE_INFINITY)),
> "-Infinity");
>
> harness.check (Double.toString (Math.min (Double.NEGATIVE_INFINITY, 0.0)),
> "-Infinity");
>
> harness.check (Float.toString (Math.min (-1.0f, -2.0f)), "-2.0");
>
> harness.check (Float.toString (Math.min (2.0f, Float.NaN)), "NaN");
> harness.check (Float.toString (Math.min (Float.NaN, 2.0f)), "NaN");
>
> harness.check (Float.toString (Math.min (Float.NEGATIVE_INFINITY,
> Float.POSITIVE_INFINITY)),
> "-Infinity");
>
> harness.check (Float.toString (Math.min (Float.NEGATIVE_INFINITY, 0.0f)),
> "-Infinity");
>
>
> John Leuner
>
--