コード例 #1
0
        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));
            }
        }
コード例 #2
0
ファイル: lzcnt.cs プロジェクト: csritter/MaxMath
        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));
            }
        }
コード例 #3
0
        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));
            }
        }