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

fegettrapenable(3M)													       fegettrapenable(3M)

NAME
fegettrapenable() - get floating-point exception trap enables SYNOPSIS
DESCRIPTION
The function determines which floating-point exception traps are currently enabled. USAGE
To use this function, compile either with the default option or with the and options. Make sure your program includes For HP Integrity servers, specify on the compiler command line or place the call to this function under the effect of an affirmative pragma: If the pragma is placed outside of any top-level declarations in a file, the pragma will apply to all declarations in the compilation fol- lowing the pragma until another pragma is encountered or until the end of the file is reached. If the pragma is placed at the beginning of a block (compound statement), the pragma will apply until another pragma is encountered or until the end of the block is reached. For PA-RISC, you might need to use the compiler option in order to prevent optimizations that can undermine the specified behavior of this function. Link in the math library by specifying on the compiler or linker command line. For more information, see the at the following site: RETURN VALUE
The function returns the bitwise OR of the floating-point exception macros corresponding to the currently enabled exception traps. The macros are and represents all the floating-point exceptions. ERRORS
No errors are defined. EXAMPLES
Retrieve the current trap settings and determine whether a trap for the divide by zero exception is enabled. AUTHOR
was developed by HP and is not required by any current standard. SEE ALSO
feclearexcept(3M), fegetexceptflag(3M), feraiseexcept(3M), fesetexceptflag(3M), fesettrapenable(3M), fenv(5). fegettrapenable(3M)
Man Page