Average Error: 0.6 → 0.0
Time: 14.9s
Precision: 64
\[\left(\left(\left(\left(\left(x \cdot x - 5 \cdot x\right) \cdot x + 15 \cdot {x}^{2}\right) \cdot x - 20 \cdot {x}^{3}\right) \cdot x + 15 \cdot {x}^{4}\right) \cdot x - 6 \cdot {x}^{5}\right) \cdot x\]
\[{x}^{7} - 1 \cdot {x}^{6}\]
\left(\left(\left(\left(\left(x \cdot x - 5 \cdot x\right) \cdot x + 15 \cdot {x}^{2}\right) \cdot x - 20 \cdot {x}^{3}\right) \cdot x + 15 \cdot {x}^{4}\right) \cdot x - 6 \cdot {x}^{5}\right) \cdot x
{x}^{7} - 1 \cdot {x}^{6}
double f(double x) {
        double r226676 = x;
        double r226677 = r226676 * r226676;
        double r226678 = 5.0;
        double r226679 = r226678 * r226676;
        double r226680 = r226677 - r226679;
        double r226681 = r226680 * r226676;
        double r226682 = 15.0;
        double r226683 = 2.0;
        double r226684 = pow(r226676, r226683);
        double r226685 = r226682 * r226684;
        double r226686 = r226681 + r226685;
        double r226687 = r226686 * r226676;
        double r226688 = 20.0;
        double r226689 = 3.0;
        double r226690 = pow(r226676, r226689);
        double r226691 = r226688 * r226690;
        double r226692 = r226687 - r226691;
        double r226693 = r226692 * r226676;
        double r226694 = 4.0;
        double r226695 = pow(r226676, r226694);
        double r226696 = r226682 * r226695;
        double r226697 = r226693 + r226696;
        double r226698 = r226697 * r226676;
        double r226699 = 6.0;
        double r226700 = pow(r226676, r226678);
        double r226701 = r226699 * r226700;
        double r226702 = r226698 - r226701;
        double r226703 = r226702 * r226676;
        return r226703;
}

double f(double x) {
        double r226704 = x;
        double r226705 = 7.0;
        double r226706 = pow(r226704, r226705);
        double r226707 = 1.0;
        double r226708 = 6.0;
        double r226709 = pow(r226704, r226708);
        double r226710 = r226707 * r226709;
        double r226711 = r226706 - r226710;
        return r226711;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.6

    \[\left(\left(\left(\left(\left(x \cdot x - 5 \cdot x\right) \cdot x + 15 \cdot {x}^{2}\right) \cdot x - 20 \cdot {x}^{3}\right) \cdot x + 15 \cdot {x}^{4}\right) \cdot x - 6 \cdot {x}^{5}\right) \cdot x\]
  2. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{\left({x}^{6} - 1 \cdot {x}^{5}\right)} \cdot x\]
  3. Taylor expanded around 0 0.0

    \[\leadsto \color{blue}{{x}^{7} - 1 \cdot {x}^{6}}\]
  4. Final simplification0.0

    \[\leadsto {x}^{7} - 1 \cdot {x}^{6}\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "(((((x*x-5*x)*x+15*pow(x,2))*x - 20*pow(x,3))*x + 15*pow(x,4))*x - 6*pow(x, 5))*x "
  :precision binary64
  (* (- (* (+ (* (- (* (+ (* (- (* x x) (* 5 x)) x) (* 15 (pow x 2))) x) (* 20 (pow x 3))) x) (* 15 (pow x 4))) x) (* 6 (pow x 5))) x))