Campbell Ritchie wrote:Unless you divide by a number whose prime factors only include 2 and 5, every division will recur, and go on to infinity. So you must round somewhere for BigDecimal for any number not a multiple of 2 and 5 only. 2048 is a multiple of 2 only, but 2047 isn't. so you must round. Choose a larger precision for your rounding.

I guess, if you wanted the calculator's precision and scale, in BigDecimal you ask or specify, isn't it rather than setting the scale to a small value as 5.

Or did you find an alternative?

Regards

Krishna