There is a BigDecimal
datatype in java.
When I declare the number 5190000000 as BigDecimal like this:
BigDecimal a = new BigDecimal(5190000000L * 1.0F);
, it is excited and the following output is seen:
Output:
5190000128
while I ommit the F as float value, it is correct like this:
BigDecimal a = new BigDecimal(5190000000L * 1.0);
Output:
5190000000
What is it? and how does F parameter make mistake?I really confused!!!!
EDIT
The version of jdk is 1.8