Retain precision of double in Java with BigDecimal
Kirtan Thakkar
Life is all about learningIf you have ever worked with the double
values when you need precision, you might have came across a weird issue where you lost the precision of your value with a very little number. Like, when you add 0.1
3 times you get 0.30000000000000004
instead of 0.3
.