#include
#include
int main()
{
double x=pow(2,31)+1;
if((float)1.0/float(x)*float(x)==1)
{
printf("for the type is float,it's true\n");
}
else
{
printf("for the type is float,it's false\n");
}
return 0;
}
题目要求是判断x=2^31+1对于那个式子是否等于1,我不知道怎么写就这样写了一个程序,希望大家能够指正我的错误是怎么回事,还有那个数是不是越界了?那题目应该怎么做呢?