[lkml]   [1998]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: have a look at this proggie, please.
Followup to:  <>
By author: David Weinehall <>
In newsgroup:
> > Why the surprise? You've generated an exception #0, which Intel
> > called "divide by zero" in early IA processor manuals, but now call
> > "divide error". It is raised by any divide where the result overflows.
> That's NOT an divide by zero...
> Output:
> -2147483648 * -1 = -2147483648
> Floating exception
> ^^^^^^^^^^^^^^^^^^
> Quite obviously, -MAXINT-1 * -1 is too large for an integer to hold (by
> one), but it should *NOT* report a floating exception... Right?!

No. SIGFPE is the reported exception for integer division overflow or
division by zero. Illogical, perhaps, but that's the way it is.

PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD 1E DF FE 69 EE 35 BD 74
See for web page and full PGP public key
I am Bahá'í -- ask me about it or see
"To love another person is to see the face of God." -- Les Misérables

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:45    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean