From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: fc89c,7e35f49d4d9340ab X-Google-Attributes: gidfc89c,public X-Google-Thread: 1164f8,7e35f49d4d9340ab X-Google-Attributes: gid1164f8,public X-Google-Thread: 109fba,7e35f49d4d9340ab X-Google-Attributes: gid109fba,public From: wilson@dbit.com (John Wilson) Subject: Re: Division by zero crashes on DEC should be avoidable! Date: 1998/03/06 Message-ID: <35002837.0@news.wizvax.net>#1/1 X-Deja-AN: 331443748 References: <34FF7719.41C6@ned.dem.csiro.au> Organization: D Bit, Troy, NY Newsgroups: comp.sys.dec,comp.lang.c++,comp.unix.programmer In article , Dag-Erling Coidan Sm�rgrav wrote: >Honestly, you're complaining that your program is crashing when you're >doing something illegal? > >The OS is *doing you a favor* by sending your program a SIGFPE, which >causes it to abort and produce a coredump, which you can then use for >debugging. If the division by zero were silently ignored, you'd never >know there had been an error, and you might actuallly rely on the >(incorrect) result the program would produce. Well, this depends on how you look at it. IEEE math goes to a whole lot of trouble to handle this kind of thing in a semi-useful way (the error isn't silently ignored, it gets propogated precisely so that you *don't* end up with random results the way you would on older proprietary FP systems), it seems silly to let the C RTS defeat that since otherwise IEEE math is no better than the chaos that preceeded it. John Wilson D Bit