#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<iostream>
using namespace std;
int main(){
float a=1.5678e3;
double d=1.5e100;
// 由于IEEE754的尾数可表示范围为52+'1'
// a在对阶时,尾数的有效位被舍去
cout<<((a+d)==d)<<endl; // 输出:1
cout<<((a+d-d)==a)<<endl; // 输出:0
cout<<a<<endl;
cout<<d<<endl;
}
标签:1.5,cout,尾数,IEEE754,int,include
From: https://www.cnblogs.com/Biang-blog/p/16851853.html