ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
PK 0]vѻh h %25-i.rinu [ U:RDoc::AnyMethod[iI"%:ETI"
Bignum#%;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I";Returns big modulo other. See Numeric.divmod for more ;TI"information.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"#big % other -> Numeric;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]X= = remainder-i.rinu [ U:RDoc::AnyMethod[iI"remainder:ETI"Bignum#remainder;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"GReturns the remainder after dividing big by numeric.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I":-1234567890987654321.remainder(13731) #=> -6966
;TI"E-1234567890987654321.remainder(13731.24) #=> -9906.22531493148;T:@format0:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I")big.remainder(numeric) -> number
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]|1 inspect-i.rinu [ U:RDoc::AnyMethod[iI"inspect:ETI"Bignum#inspect;TF:publico:RDoc::Markup::Document:@parts[ :
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below000[ I"(p1 = v1);T@FI"Bignum;TcRDoc::NormalClass0[@FI" to_s;TPK 0]'&< < fdiv-i.rinu [ U:RDoc::AnyMethod[iI" fdiv:ETI"Bignum#fdiv;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"AReturns the floating point result of dividing big by ;TI"numeric.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"A-1234567890987654321.fdiv(13731) #=> -89910996357705.5
;TI"@-1234567890987654321.fdiv(13731.24) #=> -89909424858035.7;T:@format0:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I" big.fdiv(numeric) -> float
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]QV cdesc-Bignum.rinu [ U:RDoc::NormalClass[iI"Bignum:ET@I"Integer;To:RDoc::Markup::Document:@parts[o;;[
o:RDoc::Markup::Paragraph;[I"7Bignum objects hold integers outside the range of ;TI"(Fixnum. Bignum objects are created ;TI"Hautomatically when integer calculations would otherwise overflow a ;TI"*Fixnum. When a calculation involving ;TI"8Bignum objects returns a result that will fit in a ;TI"3Fixnum, the result is automatically converted.;To:RDoc::Markup::BlankLine o; ;[I"GFor the purposes of the bitwise operations and [], a ;TI"8Bignum is treated as if it were an infinite-length ;TI"2bitstring with 2's complement representation.;T@o; ;[I"/While Fixnum values are immediate, Bignum ;TI"Bobjects are not---assignment and parameter passing work with ;TI"7references to objects, not the objects themselves.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0o;;[o; ;[I"QWhen mathn is required Bignum's division and exponentiation are enhanced to ;TI">return more precise values from mathematical expressions.;T;I"lib/mathn.rb;T;0;0;0[ [U:RDoc::Constant[i I"GMP_VERSION;TI"Bignum::GMP_VERSION;T00o;;[ ;@ ;0@ @cRDoc::NormalClass0[ [[I"
class;T[[:public[ [:protected[ [:private[ [I"
instance;T[[;[,[I"%;TI"
bignum.c;T[I"&;T@C[I"*;T@C[I"**;T@C[I"+;T@C[I"-;T@C[I"-@;T@C[I"/;T@C[I"<;T@C[I"<<;T@C[I"<=;T@C[I"<=>;T@C[I"==;T@C[I"===;T@C[I">;T@C[I">=;T@C[I">>;T@C[I"[];T@C[I"^;T@C[I"abs;T@C[I"bit_length;T@C[I"coerce;T@C[I"div;T@C[I"divmod;T@C[I" eql?;T@C[I"
even?;T@C[I" fdiv;T@C[I" hash;T@C[I"inspect;T@C[I"magnitude;T@C[I"modulo;T@C[I" odd?;T@C[I"power!;FI"lib/mathn.rb;T[I"remainder;T@C[I" size;T@C[I" to_f;T@C[I" to_s;T@C[I"|;T@C[I"~;T@C[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@ @'@'cRDoc::TopLevelPK 0]3P=_ _ eql%3f-i.rinu [ U:RDoc::AnyMethod[iI" eql?:ETI"Bignum#eql?;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"7Returns true only if obj is a ;TI"JBignum with the same value as big. Contrast this ;TI"Bwith Bignum#==, which performs type conversions.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"068719476736.eql?(68719476736.0) #=> false;T:@format0:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"&big.eql?(obj) -> true or false
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]; magnitude-i.rinu [ U:RDoc::AnyMethod[iI"magnitude:ETI"Bignum#magnitude;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I".Returns the absolute value of big.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"7-1234567890987654321.abs #=> 1234567890987654321;T:@format0:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"big.magnitude -> aBignum;T0[ I"();T@FI"Bignum;TcRDoc::NormalClass00PK 0]'Ӫ coerce-i.rinu [ U:RDoc::AnyMethod[iI"coerce:ETI"Bignum#coerce;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"NReturns an array with both a +numeric+ and a +big+ represented as Bignum ;TI"
objects.;To:RDoc::Markup::BlankLine o;
; [I":This is achieved by converting +numeric+ to a Bignum.;T@o;
; [I"KA TypeError is raised if the +numeric+ is not a Fixnum or Bignum type.;T@o:RDoc::Markup::Verbatim; [I"F(0x3FFFFFFFFFFFFFFF+1).coerce(42) #=> [42, 4611686018427387904];T:@format0:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"$big.coerce(numeric) -> array
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]DYP P %26-i.rinu [ U:RDoc::AnyMethod[iI"&:ETI"
Bignum#&;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"8Performs bitwise +and+ between _big_ and _numeric_.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"!big & numeric -> integer
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]2H H %2a-i.rinu [ U:RDoc::AnyMethod[iI"*:ETI"
Bignum#*;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"4Multiplies big and other, returning the result.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"big * other -> Numeric
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]ce e %3e%3e-i.rinu [ U:RDoc::AnyMethod[iI">>:ETI"Bignum#>>;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"JShifts big right _numeric_ positions (left if _numeric_ is negative).;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I""big >> numeric -> integer
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]s2Q Q div-i.rinu [ U:RDoc::AnyMethod[iI"div:ETI"Bignum#div;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"6Performs integer division: returns integer value.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I" big.div(other) -> integer
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]> %3c%3d-i.rinu [ U:RDoc::AnyMethod[iI"<=:ETI"Bignum#<=;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the value of big is ;TI"5less than or equal to that of real.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"$big <= real -> true or false
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0][&
%3e%3d-i.rinu [ U:RDoc::AnyMethod[iI">=:ETI"Bignum#>=;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the value of big is ;TI"8greater than or equal to that of real.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"$big >= real -> true or false
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]e! size-i.rinu [ U:RDoc::AnyMethod[iI" size:ETI"Bignum#size;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"BReturns the number of bytes in the machine representation of ;TI"big.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"!(256**10 - 1).size #=> 12
;TI"!(256**20 - 1).size #=> 20
;TI" (256**40 - 1).size #=> 40;T:@format0:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"big.size -> integer
;T0[ I"();T@FI"Bignum;TcRDoc::NormalClass00PK 0][:d %3e-i.rinu [ U:RDoc::AnyMethod[iI">:ETI"
Bignum#>;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the value of big is ;TI",greater than that of real.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"#big > real -> true or false
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]E %2a%2a-i.rinu [ U:RDoc::AnyMethod[iI"**:ETI"Bignum#**;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"KRaises _big_ to the _exponent_ power (which may be an integer, float, ;TI"Bor anything that will coerce to a number). The result may be ;TI"a Fixnum, Bignum, or Float;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"/123456789 ** 2 #=> 15241578750190521
;TI".123456789 ** 1.2 #=> 5126464716.09932
;TI"0123456789 ** -2 #=> 6.5610001194102e-17;T:@format0:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I""big ** exponent -> numeric
;T0[[I"power!;Fo;; [ ;I"lib/mathn.rb;T;0I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]8): %2f-i.rinu [ U:RDoc::AnyMethod[iI"/:ETI"
Bignum#/;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"EPerforms division: the class of the resulting object depends on ;TI"Cthe class of numeric and on the magnitude of the ;TI"result.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I" big / other -> Numeric
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]_D %5b%5d-i.rinu [ U:RDoc::AnyMethod[iI"[]:ETI"Bignum#[];TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"JBit Reference---Returns the nth bit in the (assumed) binary ;TI"Drepresentation of big, where big[0] is the least ;TI"significant bit.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [ I"a = 9**15
;TI"50.downto(0) do |n|
;TI" print a[n]
;TI" end
;T:@format0o;
; [I"produces:;T@o;; [I"8000101110110100000111000011110010100111100010111001;T;
0:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"big[n] -> 0, 1
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0] to_s-i.rinu [ U:RDoc::AnyMethod[iI" to_s:ETI"Bignum#to_s;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"HReturns a string containing the representation of big radix ;TI" base (2 through 36).;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [
I"012345654321.to_s #=> "12345654321"
;TI"G12345654321.to_s(2) #=> "1011011111110110111011110000110001"
;TI"112345654321.to_s(8) #=> "133766736061"
;TI".12345654321.to_s(16) #=> "2dfdbbc31"
;TI"-78546939656932.to_s(36) #=> "rubyrules";T:@format0:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"$big.to_s(base=10) -> string
;T0[[I"inspect;To;; [ ;@;0I"(p1 = v1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]WJY Y %5e-i.rinu [ U:RDoc::AnyMethod[iI"^:ETI"
Bignum#^;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"APerforms bitwise +exclusive or+ between _big_ and _numeric_.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"!big ^ numeric -> integer
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]t %3c-i.rinu [ U:RDoc::AnyMethod[iI"<:ETI"
Bignum#<;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the value of big is ;TI")less than that of real.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"#big < real -> true or false
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]!qJ J divmod-i.rinu [ U:RDoc::AnyMethod[iI"divmod:ETI"Bignum#divmod;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"%See Numeric#divmod.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"$big.divmod(numeric) -> array
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]gZM to_f-i.rinu [ U:RDoc::AnyMethod[iI" to_f:ETI"Bignum#to_f;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"HConverts big to a Float. If big doesn't ;TI"9fit in a Float, the result is infinity.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"big.to_f -> float
;T0[ I"();T@FI"Bignum;TcRDoc::NormalClass00PK 0]h9O O %7c-i.rinu [ U:RDoc::AnyMethod[iI"|:ETI"
Bignum#|;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"7Performs bitwise +or+ between _big_ and _numeric_.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"!big | numeric -> integer
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]D*r r modulo-i.rinu [ U:RDoc::AnyMethod[iI"modulo:ETI"Bignum#modulo;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I";Returns big modulo other. See Numeric.divmod for more ;TI"information.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"#big.modulo(other) -> Numeric;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]SvX X odd%3f-i.rinu [ U:RDoc::AnyMethod[iI" odd?:ETI"Bignum#odd?;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I">Returns true if big is an odd number.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"big.odd? -> true or false
;T0[ I"();T@FI"Bignum;TcRDoc::NormalClass00PK 0]GFS S %3d%3d%3d-i.rinu [ U:RDoc::AnyMethod[iI"===:ETI"Bignum#===;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"EReturns true only if obj has the same value ;TI"Gas big. Contrast this with Bignum#eql?, which ;TI"5requires obj to be a Bignum.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I",68719476736 == 68719476736.0 #=> true;T:@format0:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I""big == obj -> true or false
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]Q.I I %2d%40-i.rinu [ U:RDoc::AnyMethod[iI"-@:ETI"Bignum#-@;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I":Unary minus (returns an integer whose value is 0-big);T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"-big -> integer
;T0[ I"();T@FI"Bignum;TcRDoc::NormalClass00PK 0]z %7e-i.rinu [ U:RDoc::AnyMethod[iI"~:ETI"
Bignum#~;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"CInverts the bits in big. As Bignums are conceptually infinite ;TI"Dlength, the result acts as if it had an infinite number of one ;TI"Abits to the left. In hex representations, this is displayed ;TI".as two periods to the left of the digits.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"8sprintf("%X", ~0x1122334455) #=> "..FEEDDCCBBAA";T:@format0:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"~big -> integer
;T0[ I"();T@FI"Bignum;TcRDoc::NormalClass00PK 0]%)B B %2b-i.rinu [ U:RDoc::AnyMethod[iI"+:ETI"
Bignum#+;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I".Adds big and other, returning the result.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"big + other -> Numeric
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]e7 abs-i.rinu [ U:RDoc::AnyMethod[iI"abs:ETI"Bignum#abs;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I".Returns the absolute value of big.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"7-1234567890987654321.abs #=> 1234567890987654321;T:@format0:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"big.abs -> aBignum;T0[ I"();T@FI"Bignum;TcRDoc::NormalClass00PK 0]ㆴH H %2d-i.rinu [ U:RDoc::AnyMethod[iI"-:ETI"
Bignum#-;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"4Subtracts other from big, returning the result.;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I"big - other -> Numeric
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0]E0*e e %3c%3c-i.rinu [ U:RDoc::AnyMethod[iI"<<:ETI"Bignum#<<;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"JShifts big left _numeric_ positions (right if _numeric_ is negative).;T:
@fileI"
bignum.c;T:0@omit_headings_from_table_of_contents_below0I""big << numeric -> integer
;T0[ I" (p1);T@FI"Bignum;TcRDoc::NormalClass00PK 0][