Minor cleanups to the core library

This commit is contained in:
gingerBill
2023-09-30 20:26:04 +01:00
parent 3e0fd63682
commit 5023313c03
7 changed files with 43 additions and 86 deletions
+1 -1
View File
@@ -1163,7 +1163,7 @@ internal_int_prime_next_prime :: proc(a: ^Int, trials: int, bbs_style: bool, all
/*
If we didn't pass the sieve and step == MP_MAX then skip test */
if (y && (step >= ((1 << _DIGIT_BITS) - kstep))) { continue }
if y && (step >= ((1 << _DIGIT_BITS) - kstep)) { continue }
if internal_int_is_prime(a, trials) or_return { break }
}
+1 -1
View File
@@ -1089,7 +1089,7 @@ _private_int_div_school :: proc(quotient, remainder, numerator, denominator: ^In
Step 3. for i from n down to (t + 1).
*/
#no_bounds_check for i := n; i >= (t + 1); i -= 1 {
if (i > x.used) { continue }
if i > x.used { continue }
/*
step 3.1 if xi == yt then set q{i-t-1} to b-1, otherwise set q{i-t-1} to (xi*b + x{i-1})/yt