Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual—522629-013
5-262
FP_IEEE_EXCEPTIONS_GET_ Procedure
Exception flag values of Exceptions are:
Considerations
•
In addition to the above enumerated constants, a constant named 
FP_IEEE_ALL_EXCEPTS is equivalent to a combination of all the exception bits.
•
Once exception flags are set, they stay set until explicitly reset.
•
More than one exception flag can result from a single floating-point operation.
Examples
C Example
#include <kfpieee.h>
void Example(void) {
 FP_IEEE_EXCEPTIONS_SET_( 0 ); /* clear exceptions */
 DoComputation(); /* floating-point computation */
 if( FP_IEEE_EXCEPTIONS_GET_() &
 (FP_IEEE_INVALID|FP_IEEE_OVERFLOW|FP_IEEE_DIVBYZERO)
 )
 printf( "Trouble in computation! \n" );
}
Value Cause
FP_IEEE_INVALID Arithmetic calculations using either positive or 
negative infinity as an operand, zero divided by 
zero, the square root of -1, the rem function with 
zero as a divisor (which causes divide by zero), 
comparisons with invalid numbers, or impossible 
binary-decimal conversions.
FP_IEEE_DIVBYZERO Computing x/0, where x is finite and nonzero.
FP_IEEE_OVERFLOW Result too large to represent as a normalized 
number.
FP_IEEE_UNDERFLOW Result both inexact and too small to represent 
as a normalized number.
FP_IEEE_INEXACT Result less accurate than it could have been 
with a larger exponent range or more fraction 
bits. Most commonly set when rounding off a 
repeating fraction such as 1.0/3.0. Also set for 
underflow cases and some overflow cases, but 
not for division by zero.










