Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fpecnt(3f) — Ultrix/UWS 4.0 VAX

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

signal(3f)

trpfpe(3f)  —  VAX  —  Unsupported

Name

trpfpe, fpecnt − trap and repair floating point faults

Syntax

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

Description

The trpfpe routine 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.  The 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 cannot be repaired will result in the default action, typically an abort with core image. 

The fpecnt routine 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. 

Restrictions

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 cannot 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. 

Files

/usr/lib/libF77.a

See Also

signal(3f)

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