Build 1.0_r1(from source)

java.math
Class Conversion

java.lang.Object
  extended by java.math.Conversion

 class Conversion
extends Object

Static library that provides BigInteger base conversion from/to any integer represented in an String Object.


Field Summary
(package private) static int[] bigRadices
          bigRadices values are precomputed maximal powers of radices (integer numbers from 2 to 36) that fit into unsigned int (32 bits).
(package private) static int[] digitFitInInt
          Holds the maximal exponent for each radix, so that radixdigitFitInInt[radix] fit in an int (32 bits).
 
Method Summary
(package private) static double bigInteger2Double(BigInteger val)
           
(package private) static String bigInteger2String(BigInteger val, int radix)
           
(package private) static long divideLongByBillion(long a)
           
(package private) static String toDecimalScaledString(BigInteger val, int scale)
          Builds the correspondent String representation of val being scaled by scale.
(package private) static String toDecimalScaledString(long value, int scale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

digitFitInInt

static final int[] digitFitInInt
Holds the maximal exponent for each radix, so that radixdigitFitInInt[radix] fit in an int (32 bits).


bigRadices

static final int[] bigRadices
bigRadices values are precomputed maximal powers of radices (integer numbers from 2 to 36) that fit into unsigned int (32 bits). bigRadices[0] = 2 ^ 31, bigRadices[8] = 10 ^ 9, etc.

Method Detail

bigInteger2String

static String bigInteger2String(BigInteger val,
                                int radix)
See Also:
BigInteger.toString(int)

toDecimalScaledString

static String toDecimalScaledString(BigInteger val,
                                    int scale)
Builds the correspondent String representation of val being scaled by scale.

See Also:
BigInteger.toString(), BigDecimal.toString()

toDecimalScaledString

static String toDecimalScaledString(long value,
                                    int scale)

divideLongByBillion

static long divideLongByBillion(long a)

bigInteger2Double

static double bigInteger2Double(BigInteger val)
See Also:
BigInteger.doubleValue()

Build 1.0_r1(from source)

Please submit a feedback, bug or feature