Mail Archives: djgpp/1998/08/25/08:14:04
On Mon, 24 Aug 1998, Morten Stenshorne wrote:
> However, if you're use integers, you are right - you should get an
> divide-by-zero exception.
This exception should in general trigger a signal which should abort the
program with a traceback.
> Just try this:
> -----------
> double a=5, b=0;
> double c = a / b;
> printf("%f\n", c);
> -----------
> It doesn't cause an exception when I run it.
It depends on the x87 setup. It might be that by default it doesn't
produce an exception, but you can change this with the _control87 library
function.
- Raw text -