[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Math.min

From: John Leuner
Subject: Re: Math.min
Date: Sun, 19 Aug 2001 06:32:18 +0000
User-agent: Mutt/1.3.18i

> This patch looks fine to me, but as I don't have Classpath running right
> now (and won't for a bit until I get done hacking Mozilla) I can't test
> them.  Therefore it is on the patches list now, at
> If someone could run this against the Muave tests right quick (John
> Leuner perhaps?) that would be wonderful :)

The patch didn't cause any improvements when used with my JVM.

skami> ~/kissme/cvs/kissme -bootclasspath 
FAIL: Double NaN comparisons (number 2)
FAIL: Double infinities (number 1)
FAIL: Double infinities (number 4)
FAIL: Small floats (number 7)
FAIL: Small floats (number 8)
FAIL: Float NaNs (number 1)
FAIL: Float NaNs (number 3)
FAIL: Float infinities (number 1)
FAIL: Float infinities (number 4)

This passes:
 harness.check (Double.toString (Math.min (2.0, Double.NaN)), "NaN");
This fails:
 harness.check (Double.toString (Math.min (Double.NaN, 2.0)), "NaN");

This prints out 2.0:
 System.err.println(Double.toString (Math.min (Double.NaN, 2.0)));

This passes:
 harness.check (Math.min (Double.NaN, 2.0), Double.NaN);

To verify Eric's patch we also have to ensure that my JVM is implementing the 
comparison operators correctly (especially for NaN). (It doesn't check NaN for 
floats yet).

I will check the patch in.

John Leuner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]