aboutsummaryrefslogtreecommitdiff
path: root/core/math/big/example.odin
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2021-08-13 23:45:00 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2021-08-13 23:45:00 +0200
commitdc02566a84f0ad98aaa4f88f0a4e4abdd3aa1f1a (patch)
tree4547febeccdcbe7a1810e86d7286ead53b89c4c3 /core/math/big/example.odin
parent37be8d40912a2fbf118efffdcf357aa68b78ec08 (diff)
big: Add `_private_int_div_recursive`.
Diffstat (limited to 'core/math/big/example.odin')
-rw-r--r--core/math/big/example.odin15
1 files changed, 9 insertions, 6 deletions
diff --git a/core/math/big/example.odin b/core/math/big/example.odin
index ff4d71059..986580f7f 100644
--- a/core/math/big/example.odin
+++ b/core/math/big/example.odin
@@ -206,13 +206,16 @@ demo :: proc() {
a, b, c, d, e, f := &Int{}, &Int{}, &Int{}, &Int{}, &Int{}, &Int{};
defer destroy(a, b, c, d, e, f);
- {
- SCOPED_TIMING(.rm_trials);
- for bits in 0..10242 {
- _ = number_of_rabin_miller_trials(bits);
- }
+ power_of_two(a, 14_500);
+ print("a: ", a);
+
+ power_of_two(b, 10_500);
+
+ if err := internal_int_divmod(c, d, a, b); err != nil {
+ fmt.printf("Error: %v\n", err);
}
- SCOPED_COUNT_ADD(.rm_trials, 10242);
+ print("c: ", c);
+ print("d: ", d);
}
main :: proc() {