Coefficients and exponents can be any positive or negatice real number. Input - string. X - some number(s).
class Term
{
public:
double coeff;
double exp;
double val;
double calc();
}
void calc(string expr)
{
std::vector<Term> elements = parse(expr);
double sum = 0.0;
for (i : elements)
{
sum + elements[i].calc();
}
}
Coefficients and exponents can be any positive or negatice real number. Input - string. X - some number(s).