Rich,
We have a line in unixscr.c that looks like this:
signal(SIGFPE, fpe_handler);
Don't you have to do a little extra magic on x86 to have a floating point exception generated by this stuff? Maybe there's a gcc flag to control it. IIRC, the default is *not* to generate FPEs for nan's and inf's.
Yes, you are correct. Our signal() line is doing nothing. I did try compiling with -fexceptions and -fsignaling-nans, but didn't see any difference. OTOH, what I've read online indicates that this signal doesn't actually do what we expect. It seems to deal more with integer exceptions. After implementing matherr(), starting Xfractint with a debugflag set should create a matherr file if any errors are being caught. This file never shows up when running this PAR. So, I tried it with Fractint, and there is no matherr file generated there either. So, I started adding sanity checks in the complex number sin/cos/exp/log functions in fpu087.c using isnan(), islessequal, and isinf() macros (built into gcc). All of the nan's and most of the inf's have been eliminated. What I'm looking at now is coding the builtin exp() function similar to how the FPU has to calculate it FPUcplxexp387() in fpu387.asm. This will slow down the calculation, but should eliminate the errors. Jonathan