public static void sbyte2() { Random8 rng = new Random8(135); for (int i = 0; i < 64; i++) { sbyte2 x = rng.NextSByte2(); sbyte2 y = rng.NextSByte2(); Assert.AreEqual(new byte2((byte)_gcd(x.x, y.x), (byte)_gcd(x.y, y.y)), maxmath.gcd(x, y)); } }
public static void sbyte2() { Random8 rng = new Random8(135); for (int i = 0; i < 64; i++) { sbyte2 x = rng.NextSByte2(); Assert.AreEqual(new sbyte2((sbyte)maxmath.lzcnt(x.x), (sbyte)maxmath.lzcnt(x.y)), maxmath.lzcnt(x)); } }
public static void sbyte2() { Random8 rng = new Random8(135); for (int i = 0; i < 64; i++) { sbyte2 x = rng.NextSByte2(); byte2 n = rng.NextByte2(); Assert.AreEqual(new sbyte2((sbyte)_intpow(x.x, n.x), (sbyte)_intpow(x.y, n.y)), maxmath.intpow(x, n)); } }