This is the mail archive of the
mailing list for the Mauve project.
Re: Bug in DoubleTest/FloatTest?
- From: Stephen Crawley <crawley at dstc dot edu dot au>
- To: Eric Blake <ebb9 at email dot byu dot edu>
- Cc: Andrew Haley <aph at redhat dot com>, Stephen Crawley <crawley at dstc dot edu dot au>, mauve-discuss at sources dot redhat dot com, crawley at piglet dot dstc dot edu dot au
- Date: Sat, 28 Sep 2002 14:30:51 +1000
- Subject: Re: Bug in DoubleTest/FloatTest?
> Andrew Haley wrote:
> > Right. The JDK has done this for a long while.
> > > 4) Leave it alone.
> > Yes: the JDK does not meet its specfication.
OK. I'll add a comment to testcase to note that JDK fails the test, and
why. [So people don't waste time chasing this issue.]
> There are several other known cases where the JDK does not meet its own
> specs. The jacks compiler test suite (from the same location as the
> jikes compiler) highlights a few of those - and since javac uses the JDK
> when compiling, it creates miscompiled .class files! If you search
> Sun's bug database, you will find more mention of this problem in their
> reference implementation.
> For example, the JDK is wrong on:
> ""+123456789f (it should be "1.2345679E8", not "1.23456792E8")
I added the 0.001 / 0.0010 case as a comment for the Sun Bug report
for the above case.
> ""+9.999999999999999e22 ("1.0E23", not "9.999999999999999E22")
Incidentally, the Sun Bug report for the above case classifies it as a
"request for enhancement" not a bug. Something to do with Java floating
point rounding rules.