integer division overflow throws an exception in Windows

XMLWordPrintable

    • 1.1
    • sparc
    • solaris_2.4
    • Not verified



      Name: swC45995 Date: 10/07/96


      In Windows integer division does not complete normally in overflow occurs.
      Thus, execution of the following test:

      public class test
      {
      public static void main(String argv[])
      {
      int i = 0x80000000;

      System.out.println(i / -1);
      }
      }

      produces the following output:

      exception of rounding to zero:

      instead of expected:

      -2147483648

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

            Assignee:
            Eric Gilbertson (Inactive)
            Reporter:
            Wen Wen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: