big: Add mod_power_of_two.

This commit is contained in:
Jeroen van Rijn
2021-08-11 20:59:51 +02:00
parent 78c0877994
commit d4d863c4db
2 changed files with 55 additions and 12 deletions
+4 -4
View File
@@ -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);