我正在尝试简单计算浮点值,但输出不正确
Log.i("100/50", Float.toString(100/50));
Log.i("100/100", Float.toString(100/100));
Log.i("100/250", Float.toString(100/250));
Log.i("1/5", Float.toString(1/5));
日志输出
11-10 23:36:23.677: I/100/50(28562): 2.0
11-10 23:36:23.677: I/100/100(28562): 1.0
11-10 23:36:23.685: I/100/250(28562): 0.0
11-10 23:38:23.685: I/1/5(28562): 0.0
它是一个简单的浮点计算,为什么它显示这样的答案