Average Error: 0.2 → 0.2
Time: 13.9s
Precision: 64
\[\left(\left(x \cdot x - 7 \cdot x\right) \cdot x + 28 \cdot x\right) \cdot x\]
\[\left(28 \cdot {x}^{2} + {x}^{4}\right) - 7 \cdot {x}^{3}\]
\left(\left(x \cdot x - 7 \cdot x\right) \cdot x + 28 \cdot x\right) \cdot x
\left(28 \cdot {x}^{2} + {x}^{4}\right) - 7 \cdot {x}^{3}
double f(double x) {
        double r145345 = x;
        double r145346 = r145345 * r145345;
        double r145347 = 7.0;
        double r145348 = r145347 * r145345;
        double r145349 = r145346 - r145348;
        double r145350 = r145349 * r145345;
        double r145351 = 28.0;
        double r145352 = r145351 * r145345;
        double r145353 = r145350 + r145352;
        double r145354 = r145353 * r145345;
        return r145354;
}

double f(double x) {
        double r145355 = 28.0;
        double r145356 = x;
        double r145357 = 2.0;
        double r145358 = pow(r145356, r145357);
        double r145359 = r145355 * r145358;
        double r145360 = 4.0;
        double r145361 = pow(r145356, r145360);
        double r145362 = r145359 + r145361;
        double r145363 = 7.0;
        double r145364 = 3.0;
        double r145365 = pow(r145356, r145364);
        double r145366 = r145363 * r145365;
        double r145367 = r145362 - r145366;
        return r145367;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[\left(\left(x \cdot x - 7 \cdot x\right) \cdot x + 28 \cdot x\right) \cdot x\]
  2. Taylor expanded around 0 0.2

    \[\leadsto \color{blue}{\left(28 \cdot {x}^{2} + {x}^{4}\right) - 7 \cdot {x}^{3}}\]
  3. Final simplification0.2

    \[\leadsto \left(28 \cdot {x}^{2} + {x}^{4}\right) - 7 \cdot {x}^{3}\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "((x*x - 7*x)*x + 28 * x)*x"
  :precision binary64
  (* (+ (* (- (* x x) (* 7 x)) x) (* 28 x)) x))