예제 #1
0
        public void TestMethodPow002()
        {
            double x      = 10;
            double y      = 5;
            double result = Math.Pow(x, y);

            Assert.AreEqual(result, 100000);

            decimal dx      = 10;
            decimal dy      = 5;
            decimal dResult = DecimalMath.Power(dx, dy);

            Assert.AreEqual(dResult, 100000m);
        }
예제 #2
0
        public void TestMethodPow001()
        {
            double x      = 10;
            double y      = -5;
            double result = Math.Pow(x, y);

            Assert.AreEqual(result, 1E-05);

            decimal dx      = 10;
            decimal dy      = -5;
            decimal dResult = DecimalMath.Power(dx, dy);

            Assert.AreEqual(dResult, 0.00001m);
        }