epsilon be the error in determing roots of a function take an example of a function whose solution we have to find Let function be: x^3 - x^2 + 2
| 5 | // take an example of a function whose solution we have to find |
| 6 | // Let function be: x^3 - x^2 + 2 |
| 7 | double value_of_function(double x) |
| 8 | { |
| 9 | return x*x*x - x*x + 2; |
| 10 | } |
| 11 | |
| 12 | // Prints root of func(x) with error of epilon |
| 13 | void bisection_method(double a, double b) |