コード例 #1
0
 def test_bisectionWang3(self):
     # C.G. Magadun an M.S. Bapat
     # SCILAB resolving 6th grade equation
     # http://www.researchmathsci.org/IJFMAart/IJFMA-v15n2-1.pdf
     mu = [0.8, 0.8, 0.5, 0.7, 0.5, 0.4]
     lw = utils.bisectionWang(utils.F, utils.Fprime, mu)
     espw = -0.9981565
     self.assertAlmostEqual(lw, espw, places=5)
コード例 #2
0
 def test_bisectionWang6(self):
     mu = [0.2, 0.3]
     ll = utils.bisectionWang(utils.F, utils.Fprime, mu)
     espl = 8.333332
     self.assertAlmostEqual(ll, espl, places=5)
コード例 #3
0
 def test_bisectionWang5(self):
     # find esp lambda
     mu = [0.3, 0.2, 0.25, 0.1]
     ll = utils.bisectionWang(utils.F, utils.Fprime, mu)
     espl = 0.538635
     self.assertAlmostEqual(ll, espl, places=5)
コード例 #4
0
 def test_bisectionWang4(self):
     mu = [0.3, 0.2, 0.4, 0.1]
     ll = utils.bisectionWang(utils.F, utils.Fprime, mu)
     espl = 0
     self.assertAlmostEqual(ll, espl, places=5)
コード例 #5
0
 def test_bisectionWang2(self):
     # Chung-Chang Lien & Chie-Bein Chen
     mu = [0.999702, 0.844691, 0.724534, 0.694047]
     lw = utils.bisectionWang(utils.F, utils.Fprime, mu)
     espw = -0.999995
     self.assertAlmostEqual(lw, espw, places=5)
コード例 #6
0
 def test_bisectionWang1(self):
     # Chung-Chang Lien & Chie-Bein Chen
     mu = [0.624801, 0.029406, 0.326642, 0.374676]
     lw = utils.bisectionWang(utils.F, utils.Fprime, mu)
     espw = -0.659279
     self.assertAlmostEqual(lw, espw, places=5)