Exemplo n.º 1
0
        public static void Short16()
        {
            bool     result = true;
            Random64 x      = new Random64(47);

            for (int i = 0; i < Tests.Short16.NUM_TESTS; i++)
            {
                bool16  b = x.NextBool16();
                short16 a = maxmath.negate(Tests.Short16.TestData_LHS[i], b);

                result &= maxmath.all(a == maxmath.select(Tests.Short16.TestData_LHS[i], -Tests.Short16.TestData_LHS[i], b));
            }

            Assert.AreEqual(true, result);
        }