I have 2 BigDecimals, and I want to remove the same amount leading zeros for both numbers, even those behind the comma. Is there any way of doing that without the expensive toString conversion? Heres some examples of how I want it to look like:
0.0004 -> 0.4
there were 3 zeros behind the comma, so I want to remove 3 zeros on the other one too:
0.00003 -> 0.03
Take the larger number, apply movePointRight iteratively while comparing with 0.1
to know when to stop. Then move the point right by the same amount on the smaller number.