> Perhaps japize > should use Double.doubleToLongBits() to compare the bitwise value of > double constants (likewise Float.floatToIntBits()).
That would be a bit safer, considering that even JDK 1.4.x has minor bugs in its implementations of double -> string translation! However, even comparing the bits returned Double.doubleToLongBits() is not strictly correct, because the Java VM spec says that VMs are allowed to use a range of bit patterns to represent NaN values. The safest way for for japize to compare Java doubles (and floats) is to do the following: double d1, d2; ... boolean sameValue = (Double.isNaN(d1) && Double.isNaN(d2)) || (d1 == d2) Note: you have to test NaNs separately because the Java VM spec says that (NaN == NaN) always gives false!! -- Steve _______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath