I like Stepdragon's idea of using scientific notation. Instead of a BigDecimal, you could make a "BigDouble" type. It would have BigInteger for the mantissa, making the precision limitless, and an integer (or even BigInteger) power for the exponent. Tthe exponent could represent a power of 10. Maybe it would prove easier to code than BigDecimal, but I suppose you can't be sure until you try it.
B
B