Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <float.h>
    unsigned int _status87( void );

Description:
    The _status87 function returns the floating-point status word which is
    used to record the status of 8087/80287/80387/80486 floating-point
    operations.

Returns:
    The _status87 function returns the floating-point status word which is
    used to record the status of 8087/80287/80387/80486 floating-point
    operations.  The description of this status is found in the <float.h>
    header file.

Example:
    #include <stdio.h>
    #include <float.h>

    #define TEST_FPU(x,y) printf( "\t%s " y "\n", \
                    ((fp_status & x) ? "  " : "No") )

    void main()
      {
        unsigned int fp_status;

        fp_status = _status87();

        printf( "80x87 status\n" );
        TEST_FPU( SW_INVALID, "invalid operation" );
        TEST_FPU( SW_DENORMAL, "denormalized operand" );
        TEST_FPU( SW_ZERODIVIDE, "divide by zero" );
        TEST_FPU( SW_OVERFLOW, "overflow" );
        TEST_FPU( SW_UNDERFLOW, "underflow" );
        TEST_FPU( SW_INEXACT, "inexact result" );
      }

Classification:
    Intel

Systems:
    Math

See Also:
    _clear87, _control87, _fpreset

See Also: _clear87 _control87

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson