public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [classpath] Math.min
@ 2001-08-10  2:00 Eric Blake
  2001-08-10 13:48 ` John Leuner
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2001-08-10  2:00 UTC (permalink / raw)
  To: jewel, mauve-discuss

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);

--
Eric Blake, Elixent, Castlemead, Lwr Castle St., Bristol BS1 3AG, UK
eric.blake@elixent.com   tel:+44(0)117 917 5611


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [classpath] Math.min
  2001-08-10  2:00 [classpath] Math.min Eric Blake
@ 2001-08-10 13:48 ` John Leuner
  2001-08-14  2:51   ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: John Leuner @ 2001-08-10 13:48 UTC (permalink / raw)
  To: Eric Blake; +Cc: mauve-discuss

> 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
> 

-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [classpath] Math.min
  2001-08-10 13:48 ` John Leuner
@ 2001-08-14  2:51   ` Eric Blake
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Blake @ 2001-08-14  2:51 UTC (permalink / raw)
  To: John Leuner; +Cc: mauve-discuss

Yes, it is in CVS.  I didn't really mention my patch on this list, assuming
that the automatic message on mauve-cvs was adequate (besides, this list had
not been very active at the time).  I guess several existing tests could be
updated to take advantage of the newer code in TestHarness, not just the
ones you mentioned.

--
Eric Blake, Elixent, Castlemead, Lwr Castle St., Bristol BS1 3AG, UK
eric.blake@elixent.com   tel:+44(0)117 917 5611


> -----Original Message-----
> From: John Leuner [ mailto:jewel@pixie.co.za ]
> Sent: 10 August 2001 21:57
> To: Eric Blake
> Cc: mauve-discuss@sources.redhat.com
> Subject: Re: [classpath] Math.min
>
>
> > 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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-08-14  2:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-10  2:00 [classpath] Math.min Eric Blake
2001-08-10 13:48 ` John Leuner
2001-08-14  2:51   ` Eric Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).