Average Error: 5.2 → 0
Time: 33.1s
Precision: 64
\[\left(\left(\left(\left(\left(\left(\left(x \cdot x - 7 \cdot x\right) \cdot x + 28 \cdot {x}^{2}\right) \cdot x - 56 \cdot {x}^{3}\right) \cdot x + 70 \cdot {x}^{4}\right) \cdot x - 56 \cdot {x}^{5}\right) \cdot x + 28 \cdot {x}^{6}\right) \cdot x - 8 \cdot {x}^{7}\right) \cdot x + {x}^{8}\]
\[{x}^{9}\]
\left(\left(\left(\left(\left(\left(\left(x \cdot x - 7 \cdot x\right) \cdot x + 28 \cdot {x}^{2}\right) \cdot x - 56 \cdot {x}^{3}\right) \cdot x + 70 \cdot {x}^{4}\right) \cdot x - 56 \cdot {x}^{5}\right) \cdot x + 28 \cdot {x}^{6}\right) \cdot x - 8 \cdot {x}^{7}\right) \cdot x + {x}^{8}
{x}^{9}
double f(double x) {
        double r197341 = x;
        double r197342 = r197341 * r197341;
        double r197343 = 7.0;
        double r197344 = r197343 * r197341;
        double r197345 = r197342 - r197344;
        double r197346 = r197345 * r197341;
        double r197347 = 28.0;
        double r197348 = 2.0;
        double r197349 = pow(r197341, r197348);
        double r197350 = r197347 * r197349;
        double r197351 = r197346 + r197350;
        double r197352 = r197351 * r197341;
        double r197353 = 56.0;
        double r197354 = 3.0;
        double r197355 = pow(r197341, r197354);
        double r197356 = r197353 * r197355;
        double r197357 = r197352 - r197356;
        double r197358 = r197357 * r197341;
        double r197359 = 70.0;
        double r197360 = 4.0;
        double r197361 = pow(r197341, r197360);
        double r197362 = r197359 * r197361;
        double r197363 = r197358 + r197362;
        double r197364 = r197363 * r197341;
        double r197365 = 5.0;
        double r197366 = pow(r197341, r197365);
        double r197367 = r197353 * r197366;
        double r197368 = r197364 - r197367;
        double r197369 = r197368 * r197341;
        double r197370 = 6.0;
        double r197371 = pow(r197341, r197370);
        double r197372 = r197347 * r197371;
        double r197373 = r197369 + r197372;
        double r197374 = r197373 * r197341;
        double r197375 = 8.0;
        double r197376 = pow(r197341, r197343);
        double r197377 = r197375 * r197376;
        double r197378 = r197374 - r197377;
        double r197379 = r197378 * r197341;
        double r197380 = pow(r197341, r197375);
        double r197381 = r197379 + r197380;
        return r197381;
}

double f(double x) {
        double r197382 = x;
        double r197383 = 9.0;
        double r197384 = pow(r197382, r197383);
        return r197384;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 5.2

    \[\left(\left(\left(\left(\left(\left(\left(x \cdot x - 7 \cdot x\right) \cdot x + 28 \cdot {x}^{2}\right) \cdot x - 56 \cdot {x}^{3}\right) \cdot x + 70 \cdot {x}^{4}\right) \cdot x - 56 \cdot {x}^{5}\right) \cdot x + 28 \cdot {x}^{6}\right) \cdot x - 8 \cdot {x}^{7}\right) \cdot x + {x}^{8}\]
  2. Taylor expanded around 0 0

    \[\leadsto \color{blue}{{x}^{9}}\]
  3. Final simplification0

    \[\leadsto {x}^{9}\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "(((((((x*x-7*x)*x+28*pow(x,2))*x - 56*pow(x,3))*x + 70*pow(x,4))*x - 56*pow(x, 5))*x + 28*pow(x, 6))*x - 8*pow(x, 7))*x + pow(x, 8)"
  :precision binary64
  (+ (* (- (* (+ (* (- (* (+ (* (- (* (+ (* (- (* x x) (* 7 x)) x) (* 28 (pow x 2))) x) (* 56 (pow x 3))) x) (* 70 (pow x 4))) x) (* 56 (pow x 5))) x) (* 28 (pow x 6))) x) (* 8 (pow x 7))) x) (pow x 8)))