help: Double or BigDecimal# Java - 爪哇娇娃
G*a
1 楼
I met a problem of losing precision and please help! I am calculating an
accumulative value shich is quite small, it's the multiplication result of
some numbers look like these:
0.6333333333333334 0.002551020408163265 0.35 0.004251700680272109
0.1496794871794872 0.04421768707482993
0.34761904761904766 0.005952380952380952 0.31 0.008503401360544218
0.17910052910052912 0.05357142857142857
I tried to set the result value as either a Double or a BigDecimal, but
accumulative value shich is quite small, it's the multiplication result of
some numbers look like these:
0.6333333333333334 0.002551020408163265 0.35 0.004251700680272109
0.1496794871794872 0.04421768707482993
0.34761904761904766 0.005952380952380952 0.31 0.008503401360544218
0.17910052910052912 0.05357142857142857
I tried to set the result value as either a Double or a BigDecimal, but