示例#1
0
        public void ArcusFactorial_FullRangeTest()
        {
            for (uint number = 1; number <= 479001600; number += 1291)
            {
                uint   arcusFactorial  = number.ArcusFactorial();
                UInt64 factorial       = factorialValues[arcusFactorial];
                UInt64 factorialOfNext = factorialValues[arcusFactorial + 1];

                Assert.LessOrEqual(
                    Math.Abs((float)factorial - number),
                    Math.Abs((float)factorialOfNext - number)
                    );
            }
        }