aboutsummaryrefslogtreecommitdiff
path: root/core/math/big/example.odin
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/big/example.odin')
-rw-r--r--core/math/big/example.odin12
1 files changed, 4 insertions, 8 deletions
diff --git a/core/math/big/example.odin b/core/math/big/example.odin
index 4fbf44664..2a66251c9 100644
--- a/core/math/big/example.odin
+++ b/core/math/big/example.odin
@@ -206,16 +206,12 @@ demo :: proc() {
a, b, c, d, e, f := &Int{}, &Int{}, &Int{}, &Int{}, &Int{}, &Int{};
defer destroy(a, b, c, d, e, f);
- atoi(a, "12980742146337069150589594264770969721", 10);
+ power_of_two(a, 312);
print("a: ", a, 10, true, true, true);
- atoi(b, "4611686018427387904", 10);
+ power_of_two(b, 314);
print("b: ", b, 10, true, true, true);
-
- if err := internal_divmod(c, d, a, b); err != nil {
- fmt.printf("Error: %v\n", err);
- }
- print("c: ", c);
- print("c: ", d);
+ _private_mul_karatsuba(c, a, b);
+ print("c: ", c, 10, true, true, true);
}
main :: proc() {