1TRPFPE(3F)                                                          TRPFPE(3F)
2
3
4

NAME

6       trpfpe, fpecnt - trap and repair floating point faults
7

SYNOPSIS

9       subroutine trpfpe (numesg, rtnval)
10       double precision rtnval
11
12       integer function fpecnt ()
13
14       common /fpeflt/ fperr
15       logical fperr
16

DESCRIPTION

18       NOTE: This routine applies only to Vax computers.  It is a null routine
19       on the PDP11.
20
21       Trpfpe sets up a signal handler to trap arithmetic exceptions.  If  the
22       exception  is  due  to a floating point arithmetic fault, the result of
23       the operation is replaced with the rtnval specified.  Rtnval must be  a
24       double precision value. For example, ``0d0'' or ``dflmax()''.
25
26       The  first numesg occurrences of a floating point arithmetic error will
27       cause a message to be written to the standard error file.   Any  excep‐
28       tion  that  can't  be repaired will result in the default action, typi‐
29       cally an abort with core image.
30
31       Fpecnt returns the number of faults since the last call to trpfpe.
32
33       The logical value in the common block labelled fpeflt will  be  set  to
34       .true.  each time a fault occurs.
35

FILES

37       /usr/lib/libF77.a
38

SEE ALSO

40       signal(3F), range(3F)
41

BUGS

43       This  routine  works only for faults, not traps.  This is primarily due
44       to the Vax architecture.
45
46       If the operation involves changing  the  stack  pointer,  it  can't  be
47       repaired.   This  seldom should be a problem with the f77 compiler, but
48       such an operation might be produced by the optimizer.
49
50       The POLY and EMOD opcodes are not dealt with.
51
52
53
544.2 Berkeley Distribution        May 15, 1985                       TRPFPE(3F)
Impressum