Type:
Class

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 and exponentiation are enhanced to return more precise values from mathematical expressions.

magnitude

big.abs â aBignum Instance Public methods Returns the absolute value of big

2015-03-31 12:21:22
-

big - other â Numeric Instance Public methods Subtracts other from big, returning

2015-03-31 10:41:35
hash

big.hash â fixnum Instance Public methods Compute a hash based on the value

2015-03-31 12:08:25
&

big & numeric â integer Instance Public methods Performs bitwise and

2015-03-31 10:24:54
fdiv

big.fdiv(numeric) â float Instance Public methods Returns the floating point

2015-03-31 12:05:12
inspect

inspect(p1 = v1) Instance Public methods Alias for:

2015-03-31 12:13:49
power!

power!(p1) Instance Public methods Alias for:

2015-03-31 12:33:04
<

big Instance Public methods Returns true

2015-03-31 10:56:20
odd?

big.odd? â true or false Instance Public methods Returns true

2015-03-31 12:27:23
<=

big Instance Public methods Returns true

2015-03-31 10:59:55