.\" Copyright (c) 1983, 1993
.\" The Regents of the University of California. All rights reserved.
.\" This module is believed to contain source code proprietary to AT&T.
.\" Use and redistribution is subject to the Berkeley Software License
.\" Agreement and your Software Agreement with AT&T (Western Electric).
.\" @(#)trpfpe.3 8.1 (Berkeley) 6/5/93
.TH TRPFPE 3F "June 5, 1993"
trpfpe, fpecnt \- trap and repair floating point faults
.B subroutine trpfpe (numesg, rtnval)
.B double precision rtnval
.B integer function fpecnt ()
\fBNOTE: This routine applies only to Vax computers.\fR
It is a null routine on the PDP11.
sets up a signal handler to trap arithmetic exceptions.
If the exception is due to a floating point arithmetic fault,
the result of the operation is replaced with the
must be a double precision value. For example, ``0d0'' or ``dflmax()''.
occurrences of a floating point arithmetic error will cause a message
to be written to the standard error file.
Any exception that can't be repaired will result in the default
action, typically an abort with core image.
returns the number of faults since the last call to
The logical value in the common block labelled
each time a fault occurs.
.ie \nM /usr/ucb/lib/libF77.a
This routine works only for
This is primarily due to the Vax architecture.
If the operation involves changing the stack pointer, it can't be repaired.
This seldom should be a problem with the f77 compiler, but such an operation
might be produced by the optimizer.
The POLY and EMOD opcodes are not dealt with.