I am writing a program that has to round very large and precise numbers (possibly many more significant digits than even double could handle), and am using BigDecimals.
Is there a way to make BigDecimal round based on place and not significant figures?
That is, I need 0.5 to round to 1 and 0.4 to round to 0, but since they are the same number of significant figures, BigDecimal refuses to round either of them.
I suspect you want
setScale: