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 _clear87( void );

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

Returns:
    The _clear87 function returns the old floating-point status.  The
    description of this status is found in the <float.h> header file.

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

    void main()
      {
        unsigned int fp_status;

        fp_status = _clear87();

        printf( "80x87 status =" );
        if( fp_status & SW_INVALID )
            printf( " invalid" );
        if( fp_status & SW_DENORMAL )
            printf( " denormal" );
        if( fp_status & SW_ZERODIVIDE )
            printf( " zero_divide" );
        if( fp_status & SW_OVERFLOW )
            printf( " overflow" );
        if( fp_status & SW_UNDERFLOW )
            printf( " underflow" );
        if( fp_status & SW_INEXACT )
            printf( " inexact_result" );
        printf( "\n" );
      }

Classification:
    Intel

Systems:
    Math

See Also:
    _control87, _fpreset, _status87

See Also: _control87 _fpreset

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