Possible Duplicate:
Floating point inaccuracy examples
In the first, I apologize for my poor English.
We all know Java float number calculation error. Such as follows:
System.out.println(0.0934 * 1000);
System.out.println(0.0935 * 1000);
System.out.println(0.0936 * 1000);
The result is
93.39999999999999
93.5
93.60000000000001
And we can use BigDecimal to resolve this problem.
I want to know the principle of the error. What reason caused the problem.
Thanks.