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/_status8.c

21 lines
530 B
C

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