Average Error: 0.2 → 0.2
Time: 17.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 r49273059 = x;
        double r49273060 = r49273059 * r49273059;
        double r49273061 = 3.0;
        double r49273062 = 2.0;
        double r49273063 = r49273059 * r49273062;
        double r49273064 = r49273061 - r49273063;
        double r49273065 = r49273060 * r49273064;
        return r49273065;
}

double f(double x) {
        double r49273066 = 3.0;
        double r49273067 = x;
        double r49273068 = 2.0;
        double r49273069 = r49273067 * r49273068;
        double r49273070 = r49273066 - r49273069;
        double r49273071 = r49273070 * r49273067;
        double r49273072 = r49273071 * r49273067;
        return r49273072;
}

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 2019171 
(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))))