double bb=3;long long aa=31003548835085750;
cout<<endl<<aa+bb;
结果是31003548835085756而不是31003548835085753 为何呢
double bb=3;long long aa=31003548835085750;
cout<<endl<<aa+bb;
结果是31003548835085756而不是31003548835085753 为何呢
收起
double类型有效数字位也是有限的,大概15,16位。你这第17位就保证不了了
报告相同问题?