#include<iostream>
#include<stdio.h>
#include<cmath>//调用了fabs、pow函数
using namespace std;
double f(int,int,int,int,double); //函数声明
double f1(int,int,int,int,double);
double get_solution(int,int,int,int,double);
int main()
{
int a,b,c,d;
double solution,solution_value;
cout<<"pls input the parameters of the equation a,b,c,d;and the estimate x"<<endl;
cin>>a>>b>>c>>d>>solution;
solution_value=get_solution(a,b,c,d,solution);
if(solution_value<=1e-5)//当求得的根很小时,直接让它为0
solution_value=0;
cout<<"the solution near "<<solution<<" is "<<solution_value<<endl;
getchar();
return 0;
}
double f(int w_f,int x_f,int y_f,int z_f,double sol_f)//当根
#include<stdio.h>
#include<cmath>//调用了fabs、pow函数
using namespace std;
double f(int,int,int,int,double); //函数声明
double f1(int,int,int,int,double);
double get_solution(int,int,int,int,double);
int main()
{
int a,b,c,d;
double solution,solution_value;
cout<<"pls input the parameters of the equation a,b,c,d;and the estimate x"<<endl;
cin>>a>>b>>c>>d>>solution;
solution_value=get_solution(a,b,c,d,solution);
if(solution_value<=1e-5)//当求得的根很小时,直接让它为0
solution_value=0;
cout<<"the solution near "<<solution<<" is "<<solution_value<<endl;
getchar();
return 0;
}
double f(int w_f,int x_f,int y_f,int z_f,double sol_f)//当根