Exemplo n.º 1
0
        public static void long3()
        {
            Random64 rng = new Random64(135);

            for (long i = 0; i < 64; i++)
            {
                long3 x = rng.NextLong3();
                long3 y = rng.NextLong3();

                Assert.AreEqual(new ulong3((ulong)_gcd(x.x, y.x), (ulong)_gcd(x.y, y.y), (ulong)_gcd(x.z, y.z)), maxmath.gcd(x, y));
            }
        }
Exemplo n.º 2
0
        public static void long3()
        {
            Random64 rng = new Random64(135);

            for (long i = 0; i < 64; i++)
            {
                long3 x = rng.NextLong3();

                Assert.AreEqual(new long3((long)math.lzcnt(x.x), (long)math.lzcnt(x.y), (long)math.lzcnt(x.z)), maxmath.lzcnt(x));
            }
        }
Exemplo n.º 3
0
        public static void long3()
        {
            Random64 rng = new Random64(135);

            for (long i = 0; i < 64; i++)
            {
                long3  x = rng.NextLong3();
                ulong3 n = rng.NextULong3();

                Assert.AreEqual(new long3((long)_intpow(x.x, n.x), (long)_intpow(x.y, n.y), (long)_intpow(x.z, n.z)), maxmath.intpow(x, n));
            }
        }