struct BigInt

Included Modules

Defined in:

big_int/big_int.cr

Class Method Summary

Instance Method Summary

Instance methods inherited from module Comparable(T)

<(other : T) <, <=(other : T) <=, <=>(other : T) <=>, ==(other : T) ==, >(other : T) >, >=(other : T) >=, between?(min, max) between?

Instance methods inherited from module Comparable(T)

<(other : T) <, <=(other : T) <=, <=>(other : T) <=>, ==(other : T) ==, >(other : T) >, >=(other : T) >=, between?(min, max) between?

Instance methods inherited from module Comparable(T)

<(other : T) <, <=(other : T) <=, <=>(other : T) <=>, ==(other : T) ==, >(other : T) >, >=(other : T) >=, between?(min, max) between?

Instance methods inherited from module Comparable(T)

<(other : T) <, <=(other : T) <=, <=>(other : T) <=>, ==(other : T) ==, >(other : T) >, >=(other : T) >=, between?(min, max) between?

Instance methods inherited from struct Int

%(other : Int)
%(other : BigInt)
%
, &(other : UInt16)
&(other : UInt8)
&(other : UInt64)
&(other : UInt32)
&(other : Int32)
&(other : Int64)
&(other : Int8)
&(other : Int16)
&
, *(other : BigInt) *, **(other : Int)
**(other)
**
, +(other : BigInt) +, -(other : BigInt) -, /(other : BigInt)
/(x : Int)
/
, <<(count : Int) <<, <=>(other : BigInt) <=>, ===(char : Char) ===, >>(count : Int) >>, ^(other : UInt32)
^(other : UInt16)
^(other : UInt8)
^(other : Int32)
^(other : Int16)
^(other : Int64)
^(other : Int8)
^(other : UInt64)
^
, abs abs, bit(bit) bit, ceil ceil, chr chr, day day, days days, divisible_by?(num) divisible_by?, downto(n)
downto(n, &block : self -> )
downto
, even? even?, fdiv(other) fdiv, floor floor, gcd(other : Int) gcd, hash hash, hour hour, hours hours, lcm(other : Int) lcm, millisecond millisecond, milliseconds milliseconds, minute minute, minutes minutes, modulo(other) modulo, month month, months months, odd? odd?, popcount popcount, pred pred, remainder(other : Int) remainder, round round, second second, seconds seconds, succ succ, times
times(&block : self -> )
times
, to(n)
to(n, &block : self -> )
to
, to_big_i to_big_i, to_io(io : IO, format : IO::ByteFormat) to_io, to_json(io) to_json, to_s(base : Int, io : IO, upcase = false : Bool)
to_s(base : Int, upcase = false : Bool)
to_s
to_s(io : IO)
to_s
, trunc trunc, unsafe_div(other : Int8)
unsafe_div(other : UInt8)
unsafe_div(other : UInt16)
unsafe_div(other : UInt64)
unsafe_div(other : UInt32)
unsafe_div(other : Int64)
unsafe_div(other : Int16)
unsafe_div(other : Int32)
unsafe_div
, unsafe_mod(other : Int32)
unsafe_mod(other : UInt16)
unsafe_mod(other : UInt32)
unsafe_mod(other : UInt8)
unsafe_mod(other : Int64)
unsafe_mod(other : Int16)
unsafe_mod(other : Int8)
unsafe_mod(other : UInt64)
unsafe_mod
, unsafe_shl(other : UInt8)
unsafe_shl(other : Int16)
unsafe_shl(other : Int8)
unsafe_shl(other : UInt16)
unsafe_shl(other : UInt32)
unsafe_shl(other : UInt64)
unsafe_shl(other : Int32)
unsafe_shl(other : Int64)
unsafe_shl
, unsafe_shr(other : UInt64)
unsafe_shr(other : UInt16)
unsafe_shr(other : UInt8)
unsafe_shr(other : Int64)
unsafe_shr(other : Int32)
unsafe_shr(other : Int8)
unsafe_shr(other : Int16)
unsafe_shr(other : UInt32)
unsafe_shr
, upto(n, &block : self -> )
upto(n)
upto
, week week, weeks weeks, year year, years years, |(other : Int8)
|(other : UInt32)
|(other : Int32)
|(other : Int64)
|(other : UInt16)
|(other : UInt8)
|(other : UInt64)
|(other : Int16)
|
, ~ ~

Class methods inherited from struct Int

from_io(io : IO, format : IO::ByteFormat) from_io

Instance methods inherited from module Comparable(T)

<(other : T) <, <=(other : T) <=, <=>(other : T) <=>, ==(other : T) ==, >(other : T) >, >=(other : T) >=, between?(min, max) between?

Instance methods inherited from struct Number

*(other : Complex) *, +
+(other : Complex)
+
, -(other : Complex) -, /(other : Complex) /, <=>(other) <=>, ==(other : Complex) ==, abs abs, abs2 abs2, cis cis, clamp(min, max)
clamp(range : Range)
clamp
, divmod(number) divmod, i i, round(digits, base = 10) round, sign sign, significant(digits, base = 10) significant, step(limit = nil, by = 1)
step(limit = nil, by = 1, &block)
step
, to_c to_c, to_yaml(yaml : YAML::Generator) to_yaml

Class methods inherited from struct Number

[](*nums) [], zero zero

Instance methods inherited from module Comparable(T)

<(other : T) <, <=(other : T) <=, <=>(other : T) <=>, ==(other : T) ==, >(other : T) >, >=(other : T) >=, between?(min, max) between?

Instance methods inherited from struct Value

! !, ==(other) ==, nil? nil?

Instance methods inherited from class Object

! !, !=(other) !=, !~(other) !~, ==(other) ==, ===(other) ===, =~(other) =~, class class, clone clone, crystal_type_id crystal_type_id, dup dup, hash hash, inspect
inspect(io : IO)
inspect
, itself itself, not_nil! not_nil!, tap(&block) tap, to_json to_json, to_pretty_json(io : IO)
to_pretty_json
to_pretty_json
, to_s
to_s(io : IO)
to_s
, to_yaml(io : IO)
to_yaml
to_yaml
, try(&block) try

Class methods inherited from class Object

==(other : Class) ==, ===(other) ===, cast(other) : self cast, from_json(string_or_io) from_json, from_yaml(string : String) from_yaml, hash hash, inspect(io) inspect, name : String name, to_s(io) to_s

Class Method Detail

def self.new(&block) #

[View source]
def self.new(str : String, base = 10) #

[View source]
def self.new(num : Int::Signed) #

[View source]
def self.new(num : Int::Unsigned) #

[View source]
def self.new(num : Float) #

[View source]
def self.new(mpz : LibGMP::MPZ) #

[View source]
def self.new #

[View source]

Instance Method Detail

def %(other : Int) #

[View source]
def %(other : BigInt) #

[View source]
def &(other : Int) #

[View source]
def *(other : Int::Signed) #

[View source]
def *(other : BigInt) #

[View source]
def *(other : Int::Unsigned) #

[View source]
def **(other : Int) #

[View source]
def +(other : Int) #

[View source]
def +(other : BigInt) #

[View source]
def -(other : BigInt) #

[View source]
def -(other : Int) #

[View source]
def - #

[View source]
def /(other : Int) #

[View source]
def /(other : BigInt) #

[View source]
def <<(other : Int) #

[View source]
def <=>(other : BigInt) #

[View source]
def <=>(other : Int::Signed) #

[View source]
def <=>(other : Float) #

[View source]
def <=>(other : Int::Unsigned) #

[View source]
def >>(other : Int) #

[View source]
def ^(other : Int) #

[View source]
def abs #

[View source]
def digits #

[View source]
def inspect #

[View source]
def inspect(io) #

[View source]
def popcount #

[View source]
def to_big_i #

[View source]
def to_f #

[View source]
def to_f32 #

[View source]
def to_f64 #

[View source]
def to_i #

[View source]
def to_i16 #

[View source]
def to_i32 #

[View source]
def to_i64 #

[View source]
def to_i8 #

[View source]
def to_s(base : Int) #

[View source]
def to_s(io) #

[View source]
def to_s #

[View source]
def to_u #

[View source]
def to_u16 #

[View source]
def to_u32 #

[View source]
def to_u64 #

[View source]
def to_u8 #

[View source]
def to_unsafe #

[View source]
def |(other : Int) #

[View source]
def ~ #

[View source]