Average Error: 0.4 → 0.0
Time: 12.9s
Precision: 64
\[\left(\left(\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {x}^{2}\right) \cdot x - 4 \cdot {x}^{3}\right) \cdot x\]
\[{x}^{5} - 1 \cdot {x}^{4}\]
\left(\left(\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {x}^{2}\right) \cdot x - 4 \cdot {x}^{3}\right) \cdot x
{x}^{5} - 1 \cdot {x}^{4}
double f(double x) {
        double r236629 = x;
        double r236630 = r236629 * r236629;
        double r236631 = 3.0;
        double r236632 = r236631 * r236629;
        double r236633 = r236630 - r236632;
        double r236634 = r236633 * r236629;
        double r236635 = 6.0;
        double r236636 = 2.0;
        double r236637 = pow(r236629, r236636);
        double r236638 = r236635 * r236637;
        double r236639 = r236634 + r236638;
        double r236640 = r236639 * r236629;
        double r236641 = 4.0;
        double r236642 = pow(r236629, r236631);
        double r236643 = r236641 * r236642;
        double r236644 = r236640 - r236643;
        double r236645 = r236644 * r236629;
        return r236645;
}

double f(double x) {
        double r236646 = x;
        double r236647 = 5.0;
        double r236648 = pow(r236646, r236647);
        double r236649 = 1.0;
        double r236650 = 4.0;
        double r236651 = pow(r236646, r236650);
        double r236652 = r236649 * r236651;
        double r236653 = r236648 - r236652;
        return r236653;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.4

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

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

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

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

Reproduce

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