public static void long4() { Random64 rng = new Random64(135); for (long i = 0; i < 64; i++) { long4 x = rng.NextLong4(); long4 y = rng.NextLong4(); Assert.AreEqual(new ulong4((ulong)_gcd(x.x, y.x), (ulong)_gcd(x.y, y.y), (ulong)_gcd(x.z, y.z), (ulong)_gcd(x.w, y.w)), maxmath.gcd(x, y)); } }
public static void long4() { Random64 rng = new Random64(135); for (long i = 0; i < 64; i++) { long4 x = rng.NextLong4(); Assert.AreEqual(new long4((long)math.lzcnt(x.x), (long)math.lzcnt(x.y), (long)math.lzcnt(x.z), (long)math.lzcnt(x.w)), maxmath.lzcnt(x)); } }
public static void long4() { Random64 rng = new Random64(135); for (long i = 0; i < 64; i++) { long4 x = rng.NextLong4(); ulong4 n = rng.NextULong4(); Assert.AreEqual(new long4((long)_intpow(x.x, n.x), (long)_intpow(x.y, n.y), (long)_intpow(x.z, n.z), (long)_intpow(x.w, n.w)), maxmath.intpow(x, n)); } }