Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ trpfpe(3F) — AOS 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

range(3F)

signal(3F)

TRPFPE(3F)  —  

NAME

trpfpe, fpecnt − trap and repair floating point faults

SYNOPSIS

subroutine trpfpe (numesg, rtnval)
double precision rtnval integer function fpecnt () common /fpeflt/ fperr
logical fperr

DESCRIPTION

NOTE: This routine is a null routine.  IEEE default exception handling automatically provides an appropriate return value for exceptional operations.  Fpecount always returns zero.  What follows is the text of the original man page dated 26 July 1983. 

NOTE: This routine applies only to VAX computers.  It is a null routine on the PDP11. 

Trpfpe 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 rtnval specified.  Rtnval must be a double precision value. For example, “0d0” or “dflmax()”. 

The first numesg 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. 

Fpecnt returns the number of faults since the last call to trpfpe.

The logical value in the common block labeled fpeflt will be set to .true.  each time a fault occurs. 

FILES

/usr/lib/libF77.a

SEE ALSO

range(3F), signal(3F)

BUGS

This routine works only for faults, not traps. 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. 

PRPQs 5799-WZQ/5799-PFF: IBM/4.3  —  July 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026