Average Error: 0.2 → 0.2
Time: 22.4s
Precision: 64
\[\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)\]
\[\left(\left(3 - x \cdot 2\right) \cdot x\right) \cdot x\]
\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
\left(\left(3 - x \cdot 2\right) \cdot x\right) \cdot x
double f(double x) {
        double r37723805 = x;
        double r37723806 = r37723805 * r37723805;
        double r37723807 = 3.0;
        double r37723808 = 2.0;
        double r37723809 = r37723805 * r37723808;
        double r37723810 = r37723807 - r37723809;
        double r37723811 = r37723806 * r37723810;
        return r37723811;
}

double f(double x) {
        double r37723812 = 3.0;
        double r37723813 = x;
        double r37723814 = 2.0;
        double r37723815 = r37723813 * r37723814;
        double r37723816 = r37723812 - r37723815;
        double r37723817 = r37723816 * r37723813;
        double r37723818 = r37723817 * r37723813;
        return r37723818;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.2
Target0.2
Herbie0.2
\[x \cdot \left(x \cdot \left(3 - x \cdot 2\right)\right)\]

Derivation

  1. Initial program 0.2

    \[\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)\]
  2. Using strategy rm
  3. Applied associate-*l*0.2

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

    \[\leadsto \left(\left(3 - x \cdot 2\right) \cdot x\right) \cdot x\]

Reproduce

herbie shell --seed 2019169 
(FPCore (x)
  :name "Data.Spline.Key:interpolateKeys from smoothie-0.4.0.2"

  :herbie-target
  (* x (* x (- 3.0 (* x 2.0))))

  (* (* x x) (- 3.0 (* x 2.0))))