big: Add Python implementation of LCM.
This commit is contained in:
1 parent
abb15ddb38
commit
fbebf4bc4e
2 files changed
+44
-19
No files matched your search
@@ -1642,8 +1642,8 @@ _private_int_gcd_lcm :: proc(res_gcd, res_lcm, a, b: ^Int, allocator := context.
|
||||
/*
|
||||
Store quotient in `t2` such that `t2 * a` is the LCM.
|
||||
*/
|
||||
internal_div(res_lcm, a, temp_gcd_res) or_return
|
||||
err = internal_mul(res_lcm, res_lcm, b)
|
||||
internal_div(res_lcm, b, temp_gcd_res) or_return
|
||||
err = internal_mul(res_lcm, res_lcm, a)
|
||||
}
|
||||
|
||||
if res_gcd != nil {
|
||||
|
||||
Reference in new issue
Block a user