Incorrect result in gcd procedure
Issue #199
resolved
Function gcd n1 ...
Function lcm n1 ...
[R6RS] These procedures return the greatest common divisor or least common multiple of their arguments. The result is always non-negative.
(display (gcd -165543184715050652143983385447792 15946333291432216432322993695213691))
-2112366845
Comments (2)
-
repo owner -
repo owner - changed status to resolved
Using Sg_MakeIntegerU to return result value of binary gcd (Fixes
#199)→ <<cset 3700d0254d71>>
- Log in to comment
Thank you for the report!
I've just confirmed the issue. It seems implementation of binary_gcd is wrong.