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

test for JDK-4755500

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 10
    • hotspot
    • b21

      add a regression test for JDK-4755500:

      ###@###.### 2002-10-04

      Revised test case with pass/fail result:
      public class MathBugTest {
        public static void main(String[] args) {
          // Note: it's really only necessary to run this loop 8 times to
          // reproduce the bug, but the 2000-length loop causes compilation
          // of Math.round() without any other command-line flags.
          // A bug in the d2l NaN case was causing overflow of the FPU
          // stack, yielding subsequent wrong results for flds.
          for (int i=0; i<2000; i++) {
              Math.round(Double.NaN);
          }
          if (Math.round(1d) != 1) {
              throw new RuntimeException("TEST FAILED");
          }
          System.out.println("Test passed.");
        }
      }

            iignatyev Igor Ignatyev (Inactive)
            iignatyev Igor Ignatyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: