Computes the greatest common divisor between two big numbers using Euclidean algorithm.
A good explanation of the euclidean algorithm can be found at wikipedia
Prototype
bnum BigNum.gcd( bnum1 , bnum2 )
Parameters
bnum1 and bnum2
Positive big numbers.
Return Value
This function returns a big number witch represents the gcd between bnum1 and bnum2
Remarks
bnum1 and bnum2 must be created before function call.
Example
require( "BigNum.lua" )
a = BigNum.new( "200" )
b = BigNum.new( "25" )
c = BigNum.gcd( a , b )
print( "GCD = " .. c )
Output