Invalid Operation and Inexact Result in Control Word

Last reviewed: January 6, 1995
Article ID: Q32865
The information in this article applies to:
  • Microsoft Macro Assembler for MS-DOS, versions 5.0, 5.1, 5.1a, 6.0, 6.0a, and 6.0b
  • Microsoft Macro Assembler for OS/2, versions 5.1, 5.1a, 6.0, 6.0a, and 6.0b

SUMMARY

A good source of information for the 80287 Control and Status Words is the INTEL 80286 and 80287 Programmer's Reference Manual. The text below gives a brief summary of the information found in the INTEL reference concerning the Invalid Operation and Inexact Result exceptions.

MORE INFORMATION

When the 80287 processor attempts a numeric operation with invalid operands or produces a result that cannot be represented, the processor will check certain numeric exceptions. Among the exceptions checked are Invalid Operation and Inexact Result.

The 80287 reports an Invalid Operation if any of the following occurs:

   An attempt to load a register that is not empty (stack overflow).

      -or-

   An attempt to pop an operand from an empty register (stack underflow).

      -or-

   An operand is a NaN.

      -or-

   The operands cause the operation to be indeterminate (square root
      of negative number, 0/0).

If the result of an operation is not exactly representable in the destination format, the 80287 rounds the number and reports the precision exception. For example, the fraction 1/3 cannot be precisely represented in binary form.

The 80287's system of real numbers may be closed by either two models of infinity. The two models are projective and affine closure. The default means of closure is projective. When projective closure is selected, the NPX treats the special values +infinity and -infinity as a single unsigned infinity. In the affine mode, the NPX respects the signs of infinity. While affine mode may provide more information than projective mode, there are occasions when the sign may be misleading. Projective mode, on the other hand, provides less information, but will not be misleading.


Additional reference words: 5.00 5.10 5.10a 6.00 6.00a 6.00b
KBCategory: kbprg
KBSubCategory: MASMLngIss


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 6, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.