mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-30 19:30:06 +00:00
big: Add Python implementation of LCM.
This commit is contained in:
@@ -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