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

java.lang.Math.rint(double) fails for -0.0d and 10.5d on win95

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 1.1.6, 1.2.0
    • core-libs
    • x86
    • windows_95

    Description



      Name: mgC56079 Date: 04/16/98



      ---- Here is the test ----
      public class Rint {

        public static void main(String[] args) {
          System.out.println(Math.rint(-0.0D));
          System.out.println(Math.rint(10.5D));
        }

      }
      ---- Output on Solaris (correct) ----
      %java Rint
      -0.0
      10.0
      ---- Output on Win95 (wrong) ----
      0.0
      11.0
      ----

      The same class compiled under Solaris was used so this is not a
      compiler problem. This is not a JIT problem either.

      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              hongzh Hong Zhang
              mgorshen Mikhail Gorshenev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: