Deprecated. Use uintLength() or ulongLength() instead.
BUG: For testing only, this will be removed eventually
BUG: For testing only, this will be removed eventually (needs formatting options)
Convert to a hexadecimal string, with an underscore every 8 characters.
Returns the value of this BigInt as an int, or +- long.max if outside the representable range.
Returns the value of this BigInt as a long, or +- long.max if outside the representable range.
Number of significant uints which are used in storing this number. The absolute value of this BigInt is always < 2^(32*uintLength)
Number of significant ulongs which are used in storing this number. The absolute value of this BigInt is always < 2^(64*ulongLength)
Construct a BigInt from a decimal or hexadecimal string. The number must be in the form of a D decimal or hex literal: It may have a leading + or - sign; followed by "0x" if hexadecimal. Underscores are permitted. BUG: Should throw a IllegalArgumentException/ConvError if invalid character found
Return x raised to the power of y This interface is tentative and may change.
A struct representing an arbitrary precision integer
All arithmetic operations are supported, except unsigned shift right (>>>). Reverse operations are supported only for int, long, and ulong, due to language limitations. It implements value semantics using copy-on-write. This means that assignment is cheap, but operations such as x++ will cause heap allocation. (But note that for most bigint operations, heap allocation is inevitable anyway).
Performance is excellent for numbers below ~1000 decimal digits. For X86 machines, highly optimised assembly routines are used.