This is the mail archive of the mailing list for the Mauve project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.

-- Steve

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]