Class deprecated or moved

This class is deprecated or moved on the latest stable version. The last existing version (v2_2_9) is shown here.

Bignum objects hold integers outside the range of Fixnum. Bignum objects are created automatically when integer calculations would otherwise overflow a Fixnum. When a calculation involving Bignum objects returns a result that will fit in a Fixnum, the result is automatically converted.

For the purposes of the bitwise operations and [], a Bignum is treated as if it were an infinite-length bitstring with 2’s complement representation.

While Fixnum values are immediate, Bignum objects are not—assignment and parameter passing work with references to objects, not the objects themselves.

When mathn is required Bignum’s division is enhanced to return more precise values from mathematical expressions.

(2**72) / ((2**70) * 3)  # => 4/3


GMP_VERSION = rb_sprintf("GMP %s", gmp_version)


Show files where this class is defined (2 files)
Register or log in to add new notes.