I'm just thinking about whether you can create your own custom data type? Therefore, if you need higher accuracy, which is not supported by one of the main types, you can simply "create" your complete filling of your requirements.
Is it possible and how?
Take a look at BigDecimal
BigDecimal
Fixed Decimal Continuous Decimal Numbers
- , , (, int, double ..). , BigDecimal ( BigInteger)
int
double
BigInteger
Big* - , . , add(..) - , . .
Big*
add(..)
BigDecimal dec = BigDecimal.ZERO; dec.add(new BigDecimal(5)); // nothing happens dec = dec.add(new BigDecimal(5)); // this works
Java, , . , - , Java.
, , BigDecimal ( BigInteger) .
, BigDecimal:
http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html
.
This does not mean that someone else has not done this before, and is much more effective than ever.
BigInteger and BigDecimal are what you are looking for.