big: Split up int_is_* comparison tests.

This commit is contained in:
Jeroen van Rijn
2021-08-11 20:59:53 +02:00
parent 777e17d80f
commit fd95f50c56
5 changed files with 353 additions and 262 deletions
+6 -10
View File
@@ -75,16 +75,12 @@ demo :: proc() {
a, b, c, d, e, f := &Int{}, &Int{}, &Int{}, &Int{}, &Int{}, &Int{};
defer destroy(a, b, c, d, e, f);
n := 1_024;
k := 3;
{
SCOPED_TIMING(.choose);
choose(a, n, k);
}
fmt.printf("%v choose %v ", n, k);
print("= ", a);
power_of_two(a, 3112);
fmt.printf("a is power of two: %v\n", internal_is_power_of_two(a));
sub(a, a, 1);
fmt.printf("a is power of two: %v\n", internal_is_power_of_two(a));
add(a, a, 1);
fmt.printf("a is power of two: %v\n", internal_is_power_of_two(a));
}
main :: proc() {