aboutsummaryrefslogtreecommitdiff
path: root/core/math/big/private.odin
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2021-09-07 14:17:14 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2021-09-07 14:17:14 +0200
commitfbebf4bc4e042986ff834587be04eb43c240302f (patch)
treebd59c023ab1c723247c1ecf52dc5bf61cac294ae /core/math/big/private.odin
parentabb15ddb380b187007bd26b5099323d2c4478a38 (diff)
big: Add Python implementation of LCM.
Diffstat (limited to 'core/math/big/private.odin')
-rw-r--r--core/math/big/private.odin4
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 {