aboutsummaryrefslogtreecommitdiff
path: root/core/math/big/private.odin
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2021-09-04 16:31:05 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2021-09-04 16:31:05 +0200
commitf2c5c26f2c4c192038ee25017b329964e8b45492 (patch)
treebd64236725e4a48093ed2f3553f416c26e3cd614 /core/math/big/private.odin
parent6d07bd329918802ffa164e022954e27ba5d91624 (diff)
big: Add `internal_int_prime_next_prime`.
Diffstat (limited to 'core/math/big/private.odin')
-rw-r--r--core/math/big/private.odin5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/math/big/private.odin b/core/math/big/private.odin
index 002dbda09..feffa1141 100644
--- a/core/math/big/private.odin
+++ b/core/math/big/private.odin
@@ -3223,7 +3223,8 @@ _private_int_rem_105 := [?]DIGIT{
};
#assert(105 * size_of(DIGIT) == size_of(_private_int_rem_105));
-_private_prime_table := [?]DIGIT{
+_PRIME_TAB_SIZE :: 256;
+_private_prime_table := [_PRIME_TAB_SIZE]DIGIT{
0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013,
0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035,
0x003B, 0x003D, 0x0043, 0x0047, 0x0049, 0x004F, 0x0053, 0x0059,
@@ -3260,7 +3261,7 @@ _private_prime_table := [?]DIGIT{
0x05F3, 0x05FB, 0x0607, 0x060D, 0x0611, 0x0617, 0x061F, 0x0623,
0x062B, 0x062F, 0x063D, 0x0641, 0x0647, 0x0649, 0x064D, 0x0653,
};
-#assert(256 * size_of(DIGIT) == size_of(_private_prime_table));
+#assert(_PRIME_TAB_SIZE * size_of(DIGIT) == size_of(_private_prime_table));
when MATH_BIG_FORCE_64_BIT || (!MATH_BIG_FORCE_32_BIT && size_of(rawptr) == 8) {
_factorial_table := [35]_WORD{