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.

div

big.div(other) â integer Instance Public methods Performs integer division:

2015-03-31 11:47:24
>

big > real â true or false Instance Public methods Returns true

2015-03-31 11:16:41
+

big + other â Numeric Instance Public methods Adds big and other, returning

2015-03-31 10:38:17
<<

big Instance Public methods Shifts big

2015-03-31 10:59:07
>>

big >> numeric â integer Instance Public methods Shifts big right

2015-03-31 11:23:13
even?

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

2015-03-31 12:02:36
/ 2

big / other â Numeric Instance Public methods Performs division: the class

2015-03-31 10:51:50
>=

big >= real â true or false Instance Public methods Returns true

2015-03-31 11:18:25