How to do the Bisection method in Python
问题 I want to make a Python program that will run a bisection method to determine the root of: f(x) = -26 + 85x - 91x2 +44x3 -8x4 + x5 The Bisection method is a numerical method for estimating the roots of a polynomial f(x). Are there any available pseudocode, algorithms or libraries I could use to tell me the answer? 回答1: Here's some code showing the basic technique: >>> def samesign(a, b): return a * b > 0 >>> def bisect(func, low, high): 'Find root of continuous function where f(low) and f