Invalid Operation Exceptions

For applications that require invalid operation exceptions, the default compiler behavior must be changed by using the /QAieee switch. The Windows NT behavior can then be changed to enable invalid operation exceptions by calling _ _controlfp(O, _EM_INVALID). By default, invalid operations generate a value that is Not a Number (NaN) and no exception is raised. Invalid operation exceptions can subsequently be disabled by calling _ _controlfp(EM_INVALID, EM_INVALID). In both cases, calling _ _controlfp creates additional overhead.

The underflow status bit is set when a floating-point operation underflows. The status bit is set regardless of whether the underflow exception is masked or unmasked. Having the status bit set does not result in underflow exceptions on subsequent floating-point instructions. For compatibility with other types of processors, however, you should clear the bit with _ _clearfp() when underflow exceptions are unmasked.