Tests to see if a floating-point exception has occurred.
Standard C Library (libc.a)
#include <float.h> #include <fpxcp.h>
int fp_iop_snan() int fp_iop_infsinf()
int fp_iop_infdinf() int fp_iop_zrdzr()
int fp_iop_infmzr() int fp_iop_invcmp()
int fp_iop_sqrt() int fp_iop_convert()
int
fp_iop_vxsoft ();
These subroutines aid in determining when an exception has occurred and the exception type. These subroutines can be called explicitly after blocks of code that may cause a floating-point exception.
The fp_iop_snan subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to a signaling NaN (NaNS) flag. Otherwise, a value of 0 is returned.
The fp_iop_infsinf subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to an INF-INF flag. Otherwise, a value of 0 is returned.
The fp_iop_infdinf subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to an INF/INF flag. Otherwise, a value of 0 is returned.
The fp_iop_zrdzr subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to a 0.0/0.0 flag. Otherwise, a value of 0 is returned.
The fp_iop_infmzr subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to an INF*0.0 flag. Otherwise, a value of 0 is returned.
The fp_iop_invcmp subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to a compare involving a NaN. Otherwise, a value of 0 is returned.
The fp_iop_sqrt subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to the calculation of a square root of a negative number. Otherwise, a value of 0 is returned.
The fp_iop_convert subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to the conversion of a floating-point number to an integer, where the floating-point number was a NaN, an INF, or was outside the range of the integer. Otherwise, a value of 0 is returned.
The fp_iop_vxsoft subroutine returns a value of 1 if the VXSOFT detail bit is on. Otherwise, a value of 0 is returned.