comp • gb.gmp • bigint

BigInt (gb.gmp)

This class represents an integer number with potentially unlimited number of digits.

It implements standard arithmetic and comparison operators (i.e. +, -, *, /, ^, Abs, =, <>, <, >, <=, >=) on all these objects, and provides automatic conversions with native Gambas numerical datatypes.

This class is
Create a new big integer. Its initial value is zero.
creatable
.

Static methods

Return the bitwise-and of A and B.
And  
Return the factorial of N.
Fact  
Return the Nth Fibonacci number.
Fibonacci  
Convert a string into a big integer.
FromString  
Return the greatest common divisor of A and B.
GCD  
Return the least common multiple of A and B.
LCM  
Return the one's complement of A.
Not  
Return the bitwise-inclusive or of A and B.
Or  
Return the bitwise-exclusive or of A and B.
Xor  

Properties

Methods
Return if the big integer is even.
Even  
Return if the big integer is odd.
Odd  
Invert the Bitth bit and return itself.
BChg  
Clear the Bitth bit and return itself.
BClr  
Set the Bitth bit and return itself.
BSet  
Return if the Bitth bit is set.
BTst  
Compute the inverse modulo Mod and return the result.
InvM  
Return the number raised to Exp modulo Mod.
PowM  
Shift the number left by Bits bits, and return it.
Shl  
Convert the big integer to its string representation.
ToString