aboutsummaryrefslogtreecommitdiff
path: root/core/math/big/internal.odin
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2025-11-18 15:37:57 +0100
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2025-11-18 15:37:57 +0100
commit56aab55d8250ee8191583d6b5e97eace89cfbef7 (patch)
treef002236da77d904520112e2236d658cebd7149e1 /core/math/big/internal.odin
parent784f320e12721761af494816cf07ed08d00deced (diff)
Fix #5931
Fix #5931 and add test case for it.
Diffstat (limited to 'core/math/big/internal.odin')
-rw-r--r--core/math/big/internal.odin18
1 files changed, 7 insertions, 11 deletions
diff --git a/core/math/big/internal.odin b/core/math/big/internal.odin
index e22ea0ec7..b3e23da8c 100644
--- a/core/math/big/internal.odin
+++ b/core/math/big/internal.odin
@@ -746,19 +746,15 @@ internal_int_divmod :: proc(quotient, remainder, numerator, denominator: ^Int, a
if (denominator.used > 2 * MUL_KARATSUBA_CUTOFF) && (denominator.used <= (numerator.used / 3) * 2) {
assert(denominator.used >= 160 && numerator.used >= 240, "MUL_KARATSUBA_CUTOFF global not properly set.")
- err = _private_int_div_recursive(quotient, remainder, numerator, denominator)
+ return _private_int_div_recursive(quotient, remainder, numerator, denominator)
} else {
- when true {
- err = #force_inline _private_int_div_school(quotient, remainder, numerator, denominator)
- } else {
- /*
- NOTE(Jeroen): We no longer need or use `_private_int_div_small`.
- We'll keep it around for a bit until we're reasonably certain div_school is bug free.
- */
- err = _private_int_div_small(quotient, remainder, numerator, denominator)
- }
+ return #force_inline _private_int_div_school(quotient, remainder, numerator, denominator)
+ /*
+ NOTE(Jeroen): We no longer need or use `_private_int_div_small`.
+ We'll keep it around for a bit until we're reasonably certain div_school is bug free.
+ */
+ // err = _private_int_div_small(quotient, remainder, numerator, denominator)
}
- return
}
/*