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

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.1.6, 1.2.0
    • Component/s: core-libs
    • x86
    • windows_95



      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.

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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: