コード例 #1
0
        public void FindNthRoot_8_3_point0001_2return()
        {
            double      expected    = 2;
            double      accuracy    = 0.0001;
            NumberClass numberClass = new NumberClass();
            double      actual      = numberClass.FindNthRoot(8, 3, accuracy);

            Assert.AreEqual(expected, actual, accuracy);
        }
コード例 #2
0
        public void FindNthRoot_point004241979_9_point00000001_point545return()
        {
            double      expected    = 0.545;
            double      accuracy    = 0.00000001;
            NumberClass numberClass = new NumberClass();
            double      actual      = numberClass.FindNthRoot(0.004241979, 9, accuracy);

            Assert.AreEqual(expected, actual, accuracy);
        }
コード例 #3
0
        public void FindNthRoot_1_5_point0001_1return()
        {
            double      expected    = 1;
            double      accuracy    = 0.0001;
            NumberClass numberClass = new NumberClass();
            double      actual      = numberClass.FindNthRoot(1, 5, accuracy);

            Assert.AreEqual(expected, actual, accuracy);
        }