Re: math:gcd is incorrect
- Posted by EUWX May 09, 2012
- 1644 views
At the level of writing a division algorithm for a computer language, it is the slowest compared to add, subtract, or multiply.
It is therefore handled thusly:
If Left_Arg = Right_Arg, then return 1 and exit.
If Right_Arg = 0, then return sign of Left_Arg on infinity symbol and exit.
Proceed normally with division.