标签: java floating-point
在Eclipse中测试这段简单的代码时,我发现小数点后的数字始终不准确。为什么会这样?
int kj = 1; float we = 1.1f; double dd = we + kj ; // prints 2.0999999046325684!! int kj = 1, kl = 1; float we = 11.1f; double dd = we + kj + kl; //prints 13.100000381469727