回复 10楼 rjsp
我用电脑系统配置的计算器算:3.14159 * 46847.39 * 46847.39 = 6894778300.3501952392 * 3.14159 * 46847.39 = 294350。5839002
用 float 型计算 3.14159 * 46847.39 * 46847.39 = 6894778368.00
2 * 3.14159 * 46847.39 = 294350.59
用 double 型计算 3.14159 * 46847.39 * 46847.39 = 6894778300.35
2 * 3.14159 * 46847.39 = 294350.58
改为 int 型计算 3 * 46847 * 46847 = -2006010365 (显然是溢出了)
2 * 3 * 46847 = 281082
[此贴子已经被作者于2020-10-25 00:18编辑过]