PROGRAMMING:Finding approximate roots of equations by dichotomy
The basic idea of dichotomy for finding approximate roots of equations is as follows
(1) Set the initial rooting interval [a, b];
(2) Find the midpoint of the interval x = (a + b) / 2;
(3) If | f (x)|< ε, The point x is considered to be the approximate root of the equation( ε Is a minimum;
(4) If f (x) and f (a) have the same sign, then x is assigned to a; Otherwise, assign x to B;
(5) Go to step (2) to start the next iteration.
It is known that the function $$f (x) = x ^ 5-2x ^ 4 + x ^ 2-3 $$must have an intersection with the X axis in the interval [0,2], that is, the equation f (x) = 0 has a root,
Please program to find an approximate root of the equation in the interval [0,2] by dichotomy. In the algorithm ε The value is obtained by input.
###Input format:
A very small real number representing ε。
### Output format:
An approximate root with 6 decimal places.
###Input example:
```in
zero point zero zero one
```
###Output example:
```out
one point nine four five one nine zero four three
```
###Input example:
```in
zero point zero zero zero zero zero zero zero one
```
###Output example:
```out
one point nine four five two four six eight six
```
answer:If there is no answer, please comment
(1) Set the initial rooting interval [a, b];
(2) Find the midpoint of the interval x = (a + b) / 2;
(3) If | f (x)|< ε, The point x is considered to be the approximate root of the equation( ε Is a minimum;
(4) If f (x) and f (a) have the same sign, then x is assigned to a; Otherwise, assign x to B;
(5) Go to step (2) to start the next iteration.
It is known that the function $$f (x) = x ^ 5-2x ^ 4 + x ^ 2-3 $$must have an intersection with the X axis in the interval [0,2], that is, the equation f (x) = 0 has a root,
Please program to find an approximate root of the equation in the interval [0,2] by dichotomy. In the algorithm ε The value is obtained by input.
###Input format:
A very small real number representing ε。
### Output format:
An approximate root with 6 decimal places.
###Input example:
```in
zero point zero zero one
```
###Output example:
```out
one point nine four five one nine zero four three
```
###Input example:
```in
zero point zero zero zero zero zero zero zero one
```
###Output example:
```out
one point nine four five two four six eight six
```
answer:If there is no answer, please comment