예제 #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))