--- java/lang/Double.java Fri Oct 12 16:08:07 2001 +++ ../gcc-3-1/libjava/java/lang/Double.java Fri Oct 12 16:10:50 2001 @@ -248,7 +248,11 @@ */ public static boolean isNaN (double v) { - return (doubleToLongBits (v) == 0x7ff8000000000000L); + long bits = doubleToLongBits (v); + long e = bits & 0x7ff0000000000000L; + long f = bits & 0x000fffffffffffffL; + + return e == 0x7ff0000000000000L && f != 0L; } /** @@ -273,7 +277,10 @@ */ public static boolean isInfinite (double v) { - return (v == POSITIVE_INFINITY || v == NEGATIVE_INFINITY); + long bits = doubleToLongBits (v); + long f = bits & 0x7fffffffffffffffL; + + return f == 0x7ff0000000000000L; } /** @@ -494,18 +501,12 @@ * @see #NEGATIVE_INFINITY * @since 1.2 */ - public static double parseDouble (String s) throws NumberFormatException - { - String t = s.trim (); - return parseDouble0 (t); - } - - private static native double parseDouble0 (String s) + public native static double parseDouble (String s) throws NumberFormatException; /** * Initialize JNI cache. This method is called only by the * static initializer when using JNI. */ - private static native void initIDs (); + private static void initIDs () { /* Not used in libgcj */ }; }