class DoublePrint {

  static final double[] dcases = {
    0.0,
    Double.longBitsToDouble(0x8000000000000000L),
    Double.NaN,
    Double.POSITIVE_INFINITY,
    Double.NEGATIVE_INFINITY,
    Double.MIN_VALUE,
    Double.MAX_VALUE,
    123.75,
    -0.9e7,
    1e-3,
    1.05e9,
  };

  static final float[] fcases = {
    0.0f,
    Float.intBitsToFloat(0x80000000),
    Float.NaN,
    Float.POSITIVE_INFINITY,
    Float.NEGATIVE_INFINITY,
    Float.MIN_VALUE,
    Float.MAX_VALUE,
    123.75f,
    1e7f,
    -1e-3f,
  };

  public static void main(String[] args) {
    System.out.println("Double values:");
    System.out.println("  NaN -> " +
      Long.toHexString(
      Double.doubleToLongBits(
      Double.longBitsToDouble(0x7ff000abacab0000L))));
    for (int k = 0; k < dcases.length; k++) {
      System.out.println("  " + dcases[k]);
    }
    System.out.println("  0.0/0.0 = " + (dmeth() / dmeth()));

    System.out.println();

    System.out.println("Float values:");
    System.out.println("  NaN -> " +
      Integer.toHexString(
      Float.floatToIntBits(
      Float.intBitsToFloat(0x7f80cb01))));
    for (int k = 0; k < fcases.length; k++) {
      System.out.println("  " + fcases[k]);
    }
    System.out.println("  0.0/0.0 = " + (dmeth() / dmeth()));
  }

  public static double dmeth() {
    return 0.0;
  }

  public static float fmeth() {
    return 0.0f;
  }
}

// Note: kaffe prints incorrect {Double,Float}.MIN_VALUE incorrectly

/* Expected output:
Double values:
  NaN -> 7ff8000000000000
  0.0
  -0.0
  NaN
  Infinity
  -Infinity
  4.9406564584124654E-324
  1.7976931348623157E308
  123.75
  -9000000.0
  0.001
  1.05E9
  0.0/0.0 = NaN

Float values:
  NaN -> 7fc00000
  0.0
  -0.0
  NaN
  Infinity
  -Infinity
  1.4012985E-45
  3.4028235E38
  123.75
  1.0E7
  -0.001
  0.0/0.0 = NaN
*/

// On Solaris/sparc with Sun JDK:
/* (Un)Expected output:
Double values:
  NaN -> 7ff8000000000000
  0.0
  -0.0
  NaN
  Infinity
  -Infinity
  4.9E-324
  1.7976931348623157E308
  123.75
  -9000000.0
  0.0010	               <--- JDK is wrong
  1.05E9
  0.0/0.0 = NaN

Float values:
  NaN -> 7fc00000
  0.0
  -0.0
  NaN
  Infinity
  -Infinity
  1.4E-45
  3.4028235E38
  123.75
  1.0E7
  -0.0010	               <--- JDK is wrong
  0.0/0.0 = NaN
*/

@@ -220,32 +220,61 @@
 uble.MAX_VALUE,%0A
+    666666.5555555555555555,%0A
     123.75,%0A    
@@ -269,16 +269,16 @@
 123.75,%0A
-
     -0.9
@@ -502,24 +502,54 @@
 .MAX_VALUE,%0A
+    666666.5555555555555555f,%0A
     123.75f,
@@ -1448,78 +1448,8 @@
 %0A%7D%0A%0A
-// Note: kaffe prints incorrect %7BDouble,Float%7D.MIN_VALUE incorrectly%0A%0A
 /* E
@@ -1556,23 +1556,8 @@
  4.9
-406564584124654
 E-32
@@ -1575,32 +1575,52 @@
 31348623157E308%0A
+  666666.5555555555%0A
   123.75%0A  -9000
@@ -1742,14 +1742,8 @@
  1.4
-012985
 E-45
@@ -1750,32 +1750,44 @@
 %0A  3.4028235E38%0A
+  666666.56%0A
   123.75%0A  1.0E7
@@ -1820,449 +1820,4 @@
 */%0A%0A
-// On Solaris/sparc with Sun JDK:%0A/* (Un)Expected output:%0ADouble values:%0A  NaN -%3E 7ff8000000000000%0A  0.0%0A  -0.0%0A  NaN%0A  Infinity%0A  -Infinity%0A  4.9E-324%0A  1.7976931348623157E308%0A  123.75%0A  -9000000.0%0A  0.0010%09               %3C--- JDK is wrong%0A  1.05E9%0A  0.0/0.0 = NaN%0A%0AFloat values:%0A  NaN -%3E 7fc00000%0A  0.0%0A  -0.0%0A  NaN%0A  Infinity%0A  -Infinity%0A  1.4E-45%0A  3.4028235E38%0A  123.75%0A  1.0E7%0A  -0.0010%09               %3C--- JDK is wrong%0A  0.0/0.0 = NaN%0A*/%0A

Update test with more correct expected output.