Why float not precise even when it is a small decimal number when multiplying with a large long number in Java?

前端 未结 0 1120
野性不改
野性不改 2020-12-16 08:06

I am multiplying a ratio to a sample count. The ratio is represented as a float number (0.5f) and a long type number represent the sample count.

In Java, the multipli

相关标签:
回答
  • 消灭零回复
提交回复
热议问题