|
BigInteger and BigDecimal
Java has standard classes for arbitrary-precision floating-point numbers and arbitrary-precision integers. These classes are java.math.BigDecimal and java.math.BigInteger, respectively. Because Mathematica effortlessly handles such "bignums," J/Link maps BigInteger to Mathematica integers and BigDecimal to Mathematica reals. What this means is that any Java method or field that takes, say, a BigInteger can be called from Mathematica by passing an integer. Likewise, any method or field that returns a BigDecimal will have the value returned to Mathematica as a real number.
|