Change a big rational .
Prototype
int BigRat.change( brat , num1 , num2 )
Parameters
num1
String or Big Number or Float or nil representing the numerator.
num2
String or Big Number or Float or nil representing the denominator.
Remarks
If num1 is a String or a Big Number or float, the numerator of bratis a representation if num1.
If num1 is non nil and num2 is nil then brat is a rational with unity denominator.
If num1 and num2 are nil, brat is a representation of number zero.
Example
require( "BigRat.lua" )
a = BigRat.new( "36846877697" , "3745856476754" )
BigRat.change( a , "358" , "694" )
print( a )
BigRat.change( a , "295 )
print( a )
BigRat.change( a )
print( a )
Output