#include #include char *status[2] = { "No", " " }; void main() { unsigned int fp_status; fp_status = _status87(); printf( "80x87 status\n" ); printf( "%s invalid operation\n", status[ (fp_status & SW_INVALID) == 0 ] ); printf( "%s denormalized operand\n", status[ (fp_status & SW_DENORMAL) == 0 ] ); printf( "%s divide by zero\n", status[ (fp_status & SW_ZERODIVIDE) == 0 ] ); printf( "%s overflow\n", status[ (fp_status & SW_OVERFLOW) == 0 ] ); printf( "%s underflow\n", status[ (fp_status & SW_UNDERFLOW) == 0 ] ); printf( "%s inexact result\n", status[ (fp_status & SW_INEXACT) == 0 ] ); _fpreset(); }