lkml.org 
[lkml]   [1998]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: have a look at this proggie, please.

On Wed, 18 Nov 1998, Tigran Aivazian wrote:

> #include <values.h>
> #include <stdio.h>
>
> int main(int argc, char *argv[])
> {
> int a = -MAXINT-1, b = -1, c = a*b;
>
> fprintf(stderr, "%d * %d = %d\n", a, b, c );
> if (b) {
> c = a / b;
> fprintf(stderr, "%d/%d = %d\n", a, b, c );
> }
> return 0;
> }

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.


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.052 / U:23.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site