> #DE The signed result (quotient) is too large for the destination.
> Since your result will be MAXINT+1, Divide Error and the mapping to SIGFPE
> (arithmetic exception) seems appropriate. What would you prefer it do,
> wrap the result around to zero? What does SPARC do?
Linux blah1 2.1.129 #4 Mon Nov 16 14:57:46 EST 1998 sparc64 unknown
# ./tst
-2147483648 * -1 = -2147483648
-2147483648/-1 = -2147483648
#
Linux blah2 2.1.99 #1 Sat May 2 19:31:16 1998 sparc unknown
# ./tst
-2147483648 * -1 = -2147483648
-2147483648/-1 = -2147483648
#
SunOS blah3 5.6 Generic_105181-06 sun4u sparc SUNW,Ultra-1
$ ./tst
-2147483648 * -1 = -2147483648
-2147483648/-1 = -2147483648
$
SunOS blah4 5.5.1 Generic_103640-21 sun4m sparc SUNW,SPARCstation-20
$ ./tst
-2147483648 * -1 = -2147483648
-2147483648/-1 = -2147483648
$
SunOS blah5 5.5.1 Generic_103640-21 sun4c sparc SUNW,Sun_4_75
$ ./tst
-2147483648 * -1 = -2147483648
-2147483648/-1 = -2147483648
$
OSF1 blah6 V3.2 62 alpha
$ ./tst
-2147483648 * -1 = -2147483648
Floating exception(coredump)
$
IRIX64 blah7 6.4 02121744 IP27
$ ./tst
-2147483648 * -1 = -2147483648
-2147483648/-1 = -2147483648
$
Linux blah8 2.0.33 #3 Mon Mar 9 20:09:18 EST 1998 i686 unknown
$ ./tst
-2147483648 * -1 = -2147483648
Floating point exception (core dumped)
$
HP-UX blah9 B.10.20 A 9000/735 2009688052
$ ./tst
-2147483648 * -1 = -2147483648
-2147483648/-1 = -2147483648
$
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/