Why am I receiving a “no ordering relation defined for complex numbers” error?
问题 See this question for some background. My main problem on that question was solved, and it was suggested that I ask another one for a second problem I'm having: print cubic(1, 2, 3, 4) # Correct solution: about -1.65 ... if x > 0: TypeError: no ordering relation is defined for complex numbers print cubic(1, -3, -3, -1) # Correct solution: about 3.8473 if x > 0: TypeError: no ordering relation is defined for complex numbers Cubic equations with one real root and two complex roots are receiving