This object provides arbitrary-precision signed decimal numbers. It is intended for use where absolute accuracy is required, the classic example being financial computations where the intrinsic approximations of Floats and Doubles to exact decimal values are unaccetable.
A BigDecimal consists of an arbitrary precision integer unscaled value, which is actually a BigInteger, and a 32-bit integer scale. If zero or positive, the scale is the number of digits to the right of the decimal point. If negative, the unscaled value of the number is multiplied by ten to the power of the negation of the scale. The value of the number represented by the BigDecimal is therefore (unscaledValue × 10-scale).
Note that the various Initializers do not offer initialization from Floats or Doubles. This is a deliberate design choice as Floats and Doubles are inaccurate representations of most decimal values. For example FloatVar = 0.1 will cause FloatVar to actually contain a value slightly larger than 0.1. Also note that where a numeric unquoted literal is used in code as a parameter to Initialize Basic4android converts it first to a Double and so a slightly inaccurate value may result.
Many of the operations return the BigDecimal itself so allowing operations to be chained. For example "BigD1.Add(BigD2).Multiply(BigD3)". Such expressions are evaluated left to right.
The Java documentation should be studied for more information on BigDecimal. Note that the Class Overview in the Android online documentation is incorrect and actually applies to BigInteger, not BigDecimal.
This object provides signed integers of arbitrary magnitude.
This implementation is efficient for operations traditionally used in cryptography, such as the generation of large prime numbers and computation of the modular inverse.
This API includes operations for bitwise operations in two's complement representation. Two's complement is not the internal representation used by this implementation, so such methods may be inefficient.
Many of the operations return the BigInteger itself so allowing operations to be chained. For example "BigI1.Add(BigI2).Multiply(BigI3)". Such expressions are evaluated left to right.
The Java documentation should be studied for more information on BigInteger.