Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

trpfpe(3f) [bsd man page]

TRPFPE(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 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 labelled fpeflt will be set to .true. each time a fault occurs. FILES
/usr/lib/libF77.a SEE ALSO
signal(3F), range(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. 4.2 Berkeley Distribution May 15, 1985 TRPFPE(3F)

Check Out this Related Man Page

pfm_enable_faults(3ncs) 												   pfm_enable_faults(3ncs)

Name
       pfm_enable_faults - enable asynchronous faults

Syntax
       #include <idl/c/base.h>
       #include <idl/c/pfm.h>

       void pfm_$enable_faults()

Description
       The routine enables asynchronous faults after they have been inhibited by a call to causes the operating system to pass asynchronous faults
       on to the calling process.

       While faults are inhibited, the operating system holds at most one asynchronous fault.  Consequently, when returns, there can  be  at  most
       one  fault waiting on the process.  If more than one fault was received between routines to and the process receives the first asynchronous
       fault received while faults were inhibited.

Diagnostics
       This section lists the status codes for errors returned by this routine.

       pfm_$bad_rls_order  Attempted to release a clean-up handler out of order.

       pfm_$cleanup_not_found
			   There is no pending clean-up handler.

       pfm_$cleanup_set    A clean-up handler was established successfully.

       pfm_$cleanup_set_signalled
			   Attempted to use pfm_$cleanup_set as a signal.

       pfm_$invalid_cleanup_rec
			   Passed an invalid clean-up record to a routine.

       pfm_$no_space	   Cannot allocate storage for a clean-up handler.

Files
See Also
       intro(3ncs), pfm_enable(3ncs), pfm_inhibit_faults(3ncs)

															   pfm_enable_faults(3ncs)
Man Page