Max Gilead <address@hidden> writes:
There is a bug in java.lang.Double class. The problem is that string
".3" is not recognized as a valid floating point value. According to
Java language spec it should be.
Here is test class:
public class DoubleBug
{
public static void main(String[] args)
{
System.out.println(".3 -> "+ new Double(".3").doubleValue());
}
}
Sun's implementation prints:
.3 -> 0.3
Classpath 0.03 + ORP 1.0.9 prints:
No Java handlers found
Uncaught exception:
java.lang.NumberFormatException: from Java_java_lang_Double_doubleValueOf
at DoubleBug.main
I tried this with my orp-1.0.9 and classpath 0.03 and could not
reproduce your error.
I compiled orp according to the instructions on our website in order
to use classpath natives. I used the jikes 1.15b compiler which has
fixes for numerous float/double problems of some past versions.
orp-1.0.9/mains/orp/Linux/dbg/orp -classpath $CLASSPATH DoubleTest
.3 -> 0.3