This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/_clear87.c

25 lines
569 B
C
Raw Permalink Normal View History

#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" );
}