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

integer division overflow throws an exception in Windows

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.1
    • CPU:
      sparc
    • OS:
      solaris_2.4
    • Verification:
      Not verified

      Description



      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

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: