Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4375574

HotSpot Client (-Xcomp, solaris-x86) treats double values incorectly

XMLWordPrintable

    • ladybird
    • x86
    • solaris_8
    • Verified

      HotSpot Client build 1.3.1ea-b01 in compiled (-Xcomp) mode (Solaris-x86) treats double values incorectly.

      This bug can be reproduced by the simplest test.

      Test source, script to run and log follow:
      -------------------------- test86.java -----------------------------
      public class test86 {
          public static void main (String argv[]) {
      double d1=0.1;
        double d2=0.2;
      System.out.println("d1 = " + d1);
        System.out.println("d2 = " + d2);
           }
       }

      ---------------------------test86.sh----------------------------
      #!/bin/sh

      HSJDK=/usr/local/java/jdk1.3.1/solx86
      JAVA=${HSJDK}/bin/java
      JAVAC=${HSJDK}/bin/javac

      $JAVAC test86.java
      echo =======
      $JAVA -version
      $JAVA test86
      echo =======
      $JAVA -Xcomp -version
      $JAVA -Xcomp test86
      echo =======

      ------------------------------log------------------------------
      % uname -a
      SunOS corellia 5.8 Generic i86pc i386 i86pc
      %test86.sh
      =======
      java version "1.3.1ea"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1ea-b01)
      Java HotSpot(TM) Client VM (build 1.3.1ea-b01, mixed mode)
      d1 = 0.1
      d2 = 0.2
      =======
      java version "1.3.1ea"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1ea-b01)
      Java HotSpot(TM) Client VM (build 1.3.1ea-b01, compiled mode)
      d1 = -3.305620293539215E150
      d2 = -3.3056202996363804E150
      =======

            ipsunw Ip Ip (Inactive)
            ipsunw Ip Ip (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: