public static void long2() { Random64 rng = new Random64(135); for (long i = 0; i < 64; i++) { long2 x = rng.NextLong2(); long2 y = rng.NextLong2(); Assert.AreEqual(new ulong2((ulong)_gcd(x.x, y.x), (ulong)_gcd(x.y, y.y)), maxmath.gcd(x, y)); } }
public static void long2() { Random64 rng = new Random64(135); for (long i = 0; i < 64; i++) { long2 x = rng.NextLong2(); Assert.AreEqual(new long2((long)math.lzcnt(x.x), (long)math.lzcnt(x.y)), maxmath.lzcnt(x)); } }
public static void long2() { Random64 rng = new Random64(135); for (long i = 0; i < 64; i++) { long2 x = rng.NextLong2(); ulong2 n = rng.NextULong2(); Assert.AreEqual(new long2((long)_intpow(x.x, n.x), (long)_intpow(x.y, n.y)), maxmath.intpow(x, n)); } }