4.3BSD-Reno/share/man/cat3f/trpfpe.0
TRPFPE(3F) 1985 TRPFPE(3F)
NNAAMMEE
trpfpe, fpecnt - trap and repair floating point faults
SSYYNNOOPPSSIISS
ssuubbrroouuttiinnee ttrrppffppee ((nnuummeessgg,, rrttnnvvaall))
ddoouubbllee pprreecciissiioonn rrttnnvvaall
iinntteeggeerr ffuunnccttiioonn ffppeeccnntt (())
ccoommmmoonn //ffppeefflltt// ffppeerrrr
llooggiiccaall ffppeerrrr
DDEESSCCRRIIPPTTIIOONN
NNOOTTEE:: TThhiiss rroouuttiinnee aapppplliieess oonnllyy ttoo VVaaxx ccoommppuutteerrss.. It is a
null routine on the PDP11.
_T_r_p_f_p_e sets up a signal handler to trap arithmetic excep-
tions. If the exception is due to a floating point arith-
metic fault, the result of the operation is replaced with
the _r_t_n_v_a_l specified. _R_t_n_v_a_l must be a double precision
value. For example, ``0d0'' or ``dflmax()''.
The first _n_u_m_e_s_g 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.
_F_p_e_c_n_t returns the number of faults since the last call to
_t_r_p_f_p_e.
The logical value in the common block labelled _f_p_e_f_l_t will
be set to ..ttrruuee.. each time a fault occurs.
FFIILLEESS
/usr/lib/libF77.a
SSEEEE AALLSSOO
signal(3F), range(3F)
BBUUGGSS
This routine works only for _f_a_u_l_t_s, not _t_r_a_p_s. This is pri-
marily 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.
Printed 7/27/90 May 1