How to find the bottom value of function by python dichotomy
Today, I will talk to you about python dichotomy how to find the bottom value of the function, many people may not know much about it. In order to make you understand better, the editor summed up the following content for you. I hope you can get something according to this article.
Suppose that the continuous function f (x) has a base value m on the interval (a), and the output value of the function under this base value is M, that is, f (m) = M. the dichotomy is used to find the base value: (s is a number small enough)
Let t = (aquib) / 2, if | f (t)-M | s, if (f (t)-M) and (f (a)-M) have the same sign, aquart, vice versa, continue with the dichotomy t = (aquib) / 2. Until | f (t)-M | 10 minutes * (- 10), and f (t)-44163.225 and f (1)-44163.225 have the same sign, then continue to make t = (00.5) / 2 (0.25) until the internal rate of return is found to be 0.039999445689362, which is about 0.04.
Def f (I): y = 10000 * (1m I) * * 4 + 10000 * (1m I) * * 3 + 10000 * (1m I) * * 2o 10000 * (1m I) * * 1 return ydef division (a) b is the range of optional values, (f (a)-M) * (F (b)-M)