Leo*_*nid 4 c++ floating-point
#include <iostream>
using namespace std;
int main()
{
double u = 0;
double w = -u;
cout << w << endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
为什么这个伟大的代码输出-0而不是0像人们期望的那样?
| 归档时间: |
|
| 查看次数: |
1107 次 |
| 最近记录: |