diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-09-07 14:17:14 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-09-07 14:17:14 +0200 |
| commit | fbebf4bc4e042986ff834587be04eb43c240302f (patch) | |
| tree | bd59c023ab1c723247c1ecf52dc5bf61cac294ae /core/math/big/private.odin | |
| parent | abb15ddb380b187007bd26b5099323d2c4478a38 (diff) | |
big: Add Python implementation of LCM.
Diffstat (limited to 'core/math/big/private.odin')
| -rw-r--r-- | core/math/big/private.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/big/private.odin b/core/math/big/private.odin index b3d4d80e5..14a27f600 100644 --- a/core/math/big/private.odin +++ b/core/math/big/private.odin @@ -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 {
|