def test_branin_3(self):
     self.assertLess(abs(0.397887 - branin([3 * pi, 2.475])), 1e-6)
 def test_branin_1(self):
     self.assertLess(abs(0.397887 - branin([-pi, 12.275])), 1e-6)
 def test_branin_2(self):
     self.assertLess(abs(0.397887 - branin([pi, 2.275])), 1e-6)
Beispiel #4
0
 def test_branin(self):
     self.assertLess(abs(0.397887 - branin([ -pi, 12.275])), 1e-6)
     self.assertLess(abs(0.397887 - branin([  pi,  2.275])), 1e-6)
     self.assertLess(abs(0.397887 - branin([3*pi,  2.475])), 1e-6)