public static void sbyte3() { Random8 rng = new Random8(135); for (int i = 0; i < 64; i++) { sbyte3 x = rng.NextSByte3(); sbyte3 y = rng.NextSByte3(); Assert.AreEqual(new byte3((byte)_gcd(x.x, y.x), (byte)_gcd(x.y, y.y), (byte)_gcd(x.z, y.z)), maxmath.gcd(x, y)); } }
public static void sbyte3() { Random8 rng = new Random8(135); for (int i = 0; i < 64; i++) { sbyte3 x = rng.NextSByte3(); Assert.AreEqual(new sbyte3((sbyte)maxmath.lzcnt(x.x), (sbyte)maxmath.lzcnt(x.y), (sbyte)maxmath.lzcnt(x.z)), maxmath.lzcnt(x)); } }
public static void sbyte3() { Random8 rng = new Random8(135); for (int i = 0; i < 64; i++) { sbyte3 x = rng.NextSByte3(); byte3 n = rng.NextByte3(); Assert.AreEqual(new sbyte3((sbyte)_intpow(x.x, n.x), (sbyte)_intpow(x.y, n.y), (sbyte)_intpow(x.z, n.z)), maxmath.intpow(x, n)); } }