函数怎么使用的!
usigned int clear87()怎么使用的呢!!!




求回答
!!
感谢各位 大佬 debug


程序代码:#include <stdio.h>
#include <float.h>
int main( void )
{
double a = 1e-40, b;
float x, y;
printf( "Status: %.4x - clear\n", _clear87() );
// Store into y is inexact and underflows:
y = a;
printf( "Status: %.4x - inexact, underflow\n", _clear87() );
// y is denormal:
b = y;
printf( "Status: %.4x - denormal\n", _clear87() );
}
程序代码:#include <stdio.h>
#include <fenv.h>
void fe_get_and_clear( void )
{
int flag = fetestexcept(FE_ALL_EXCEPT);
printf( "Status: %08X", flag );
if( flag&FE_INVALID )
printf( "%s", " invalid" );
if( flag&FE_DENORMAL )
printf( "%s", " denormal" );
if( flag&FE_DIVBYZERO )
printf( "%s", " divbyzero" );
if( flag&FE_OVERFLOW )
printf( "%s", " overflow" );
if( flag&FE_UNDERFLOW )
printf( "%s", " underflow" );
if( flag&FE_INEXACT )
printf( "%s", " inexact" );
putchar( '\n' );
feclearexcept(FE_ALL_EXCEPT);
}
int main( void )
{
double a = 1e-40;
fe_get_and_clear();
float y = a;
fe_get_and_clear();
double b = y;
fe_get_and_clear();
printf( "%f %f %f\n", a, y, b );
}输出是