[comp.sys.dec] how to make div-by-zero cause a fatal error on DS3100?

johns@calvin.EE.CORNELL.EDU (John Sahr) (06/22/89)

We have several DS3100's in our group, being used for a variety of things,
including numbercrunching.  The desired behaviour for floating point
errors is a fatal error (for our purposes), which is exactly what happens
on our microvaxes and one other Unix machine.

The DS3100's fortran and C compilers produce code which does not seem to
generate either fatal errors (unheeded SIGFPE) or any other signals, but
just starts to propagate NaN's and Infinity's, and slows down _dramatically_.

Is there a way to detect floating point errors through any kind of signal?
What are we doing wrong?  Compiler flags? GCC?

	thanks, 
	john


-- 
John Sahr,     Dept. of Electrical Eng., Cornell University, Ithaca, NY 14853
johns@{alfven,calvin}.ee.cornell.edu,  {rochester,cmcl2}!cornell!calvin!johns

johns@calvin.EE.CORNELL.EDU (John Sahr) (06/23/89)

In article <1133@calvin.EE.CORNELL.EDU> johns@calvin.EE.CORNELL.EDU (John Sahr) writes:
>We have several DS3100's in our group, being used for a variety of things,
>including numbercrunching.  The desired behaviour for floating point
>errors is a fatal error (for our purposes), which is exactly what happens
>on our microvaxes and one other Unix machine.
>
>The DS3100's fortran and C compilers produce code which does not seem to
>generate either fatal errors (unheeded SIGFPE) or any other signals, but
>just starts to propagate NaN's and Infinity's, and slows down _dramatically_.

Since I posted this I ran across set_fpc_csr() which you can use to cause
SIGFPE to be generated for a variety of faults.  This is documented
(apparently) in fpc(3), which for some reason we don't have.  Nevertheless,
poking around in <mips/fpu.h> suggested running

set_fpc_csr(FPCSR_ENABLES);

This does cause many SIGFPE's to be generated, although

exp(1.0e6) returns Infinity without a SIGFPE, for example.

see math(3m).

I would appreciate it if someone could suggest to me where I can get
fpc(3) man pages.

thanks,
john


-- 
John Sahr,     Dept. of Electrical Eng., Cornell University, Ithaca, NY 14853
johns@{alfven,calvin}.ee.cornell.edu,  {rochester,cmcl2}!cornell!calvin!johns