diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-07-22 18:12:19 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-08-11 20:59:51 +0200 |
| commit | d4d863c4db6fcc893ff3a04ff3ef4ca1ef757f4c (patch) | |
| tree | 8838608941394ad2256372c3d7254b6a759e260b /core/math/big/example.odin | |
| parent | 78c0877994427d1c215c00a0623ce4d9a0bfb542 (diff) | |
big: Add `mod_power_of_two`.
Diffstat (limited to 'core/math/big/example.odin')
| -rw-r--r-- | core/math/big/example.odin | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/math/big/example.odin b/core/math/big/example.odin index 014e19af6..1b8503233 100644 --- a/core/math/big/example.odin +++ b/core/math/big/example.odin @@ -57,16 +57,16 @@ demo :: proc() { a, b, c := &Int{}, &Int{}, &Int{}; defer destroy(a, b, c); - err = set(a, 0); - a.used = 2; - a.digit[1] = 1; + err = set(a, -512); err = set(b, 1); err = set(c, -4); + + err = mod_power_of_two(a, a, 10); fmt.printf("%v (%v)\n", int_get_float(a)); - print("a", a, 16); + print("a", a, 10); print("b", b, 10); print("c", c, 10); |