(
floatx) {
55static float regula_falsi(
floatx1,
floatx2,
floaty1,
floaty2) {
74x3 = x1 - (x1 - x2) * (y1) / (y1 - y2);
86std::cout <<
"Your 1st root is : "<< root << std::endl;
87}
else if(count == 2) {
88std::cout <<
"Your 2nd root is : "<< root << std::endl;
89}
else if(count == 3) {
90std::cout <<
"Your 3rd root is : "<< root << std::endl;
92std::cout <<
"Your "<< count <<
"th root is : "<< root << std::endl;
103 floata = 0, b = 0, i = 0, root = 0;
109i = ((-1) * range + gap);
static float regula_falsi(float x1, float x2, float y1, float y2)
This function finds root of the equation in given interval i.e. (x1,x2).
static float eq(float x)
This function gives the value of f(x) for given x.
void printRoot(float root, const int16_t &count)
This function prints roots of the equation.
int main()
Main function.
Functions for [False Position] (https://en.wikipedia.org/wiki/Regula_falsi) method.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4