Divide two big rationals.
Prototype
int BigRat.div( brat1 , brat2 , brat3 )
Parameters
brat1 and brat2
Numbers to be divided.
brat3
Returns the division of brat1 and brat2.
Remarks
brat1, brat2, brat3 must be created before function call
Example
require( "BigRat.lua" )
a = BigRat.new( "639" )
b = BigRat.new( "11" )
result = BigRat.new( )
BigRat.div( a , b , result )
print( a .. " / " .. b .. " = " .. result )
a = BigRat.new( "-543" )
b = BigRat.new( "-1256" )
BigRat.div( a , b , result )
print( a .. " / " .. b .. " = " .. quo )
--Try to add non valid parameters
ret = BigRat.div( a , d , result )
print( ret ) ;
Output