Пример #1
0
 def test_root6(self):
     """Two positive roots"""
     check(self, roots(1, -7, 10), (2, 5))
Пример #2
0
 def test_root5(self):
     """Leading coefficent"""
     check(self, roots(2, -1, -28), (-3.5, 4))
Пример #3
0
 def test_root4(self):
     """Different roots"""
     check(self, roots(1, 5, 6), (-2, -3))
Пример #4
0
 def test_root3(self):
     """Imaginary roots"""
     check(self, roots(1, 0, 4), None)
Пример #5
0
 def test_root2(self):
     """Same root"""
     check(self, roots(1, 6, 9), (-3, -3))
Пример #6
0
 def test_root1(self):
     """Basic difference of squares"""
     check(self, roots(1, 0, -4), (-2, 2))