Re: math:gcd is incorrect

new topic     » goto parent     » topic index » view thread      » older message » newer message

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.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu