Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!cbmvax!vu-vlsi!perry From: perry@vu-vlsi.UUCP (Rick Perry) Newsgroups: net.unix Subject: Re: catching FPEs? Message-ID: <372@vu-vlsi.UUCP> Date: Wed, 1-Oct-86 23:31:14 EDT Article-I.D.: vu-vlsi.372 Posted: Wed Oct 1 23:31:14 1986 Date-Received: Sat, 4-Oct-86 05:30:09 EDT References: <371@vu-vlsi.UUCP> Reply-To: perry@vu-vlsi.UUCP (Rick Perry) Organization: Villanova Univ. EE Dept. Lines: 24 Summary: trpfpe (f77) on Pyramid In article <371@vu-vlsi.UUCP> colin@vu-vlsi.UUCP (Colin Kelley) writes: >I'm using 4.2bsd on a Pyramid... >... >Is there some way to trap FPEs and then indicate that you want to resume >execution _after_ the code which caused the FPE? You didn't mention that your program is written in C, but I guess that's the default in the Real World. If it was Fartran, you could simply do: call trpfpe( inmax(), dflmax() ) thereby specifying that Floating Point Execptions are to be replaced by dflmax() (largest double float on the machine) for up to inmax() (largest integer on the machine) occurances. These things are available on Pyramid from f77, don't know about other machines, but perhaps there is an easy way to call that from C on Pyramid ? When you do that, the FPE's are trapped and fixed, and msg like: on_fpe: floating point exception (or overflow or something...) or something like that is printed on stdout or stderr, not sure which... ...Rick ..somewhere!here!f77!vu-vlsi!perry