[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in java.lang.Double
From: |
Brian Jones |
Subject: |
Re: Bug in java.lang.Double |
Date: |
04 May 2002 20:21:35 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
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
Brian
--
Brian Jones <address@hidden>
- Re: Bug in java.lang.Double,
Brian Jones <=