Average Error: 0.5 → 0.0
Time: 16.2s
Precision: 64
\[\left(\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {x}^{2}\right) \cdot x - 4 \cdot {x}^{3}\]
\[{x}^{4} - 1 \cdot {x}^{3}\]
\left(\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {x}^{2}\right) \cdot x - 4 \cdot {x}^{3}
{x}^{4} - 1 \cdot {x}^{3}
double f(double x) {
        double r245776 = x;
        double r245777 = r245776 * r245776;
        double r245778 = 3.0;
        double r245779 = r245778 * r245776;
        double r245780 = r245777 - r245779;
        double r245781 = r245780 * r245776;
        double r245782 = 6.0;
        double r245783 = 2.0;
        double r245784 = pow(r245776, r245783);
        double r245785 = r245782 * r245784;
        double r245786 = r245781 + r245785;
        double r245787 = r245786 * r245776;
        double r245788 = 4.0;
        double r245789 = pow(r245776, r245778);
        double r245790 = r245788 * r245789;
        double r245791 = r245787 - r245790;
        return r245791;
}

double f(double x) {
        double r245792 = x;
        double r245793 = 4.0;
        double r245794 = pow(r245792, r245793);
        double r245795 = 1.0;
        double r245796 = 3.0;
        double r245797 = pow(r245792, r245796);
        double r245798 = r245795 * r245797;
        double r245799 = r245794 - r245798;
        return r245799;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.5

    \[\left(\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {x}^{2}\right) \cdot x - 4 \cdot {x}^{3}\]
  2. Simplified0.5

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

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

    \[\leadsto {x}^{4} - 1 \cdot {x}^{3}\]

Reproduce

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