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
======================================================================
- duplicates
-
JDK-4007661 integer remainder operation throws an exception in Windows
- Closed
- relates to
-
JDK-1264851 Division of int x80000000 by -1 X86 Solaris
- Closed