Average Error: 0.2 → 0.2
Time: 17.0s
Precision: 64
\[\left(x \cdot x\right) \cdot \left(3.0 - x \cdot 2.0\right)\]
\[\left(\left(3.0 - x \cdot 2.0\right) \cdot x\right) \cdot x\]
\left(x \cdot x\right) \cdot \left(3.0 - x \cdot 2.0\right)
\left(\left(3.0 - x \cdot 2.0\right) \cdot x\right) \cdot x
double f(double x) {
        double r42029992 = x;
        double r42029993 = r42029992 * r42029992;
        double r42029994 = 3.0;
        double r42029995 = 2.0;
        double r42029996 = r42029992 * r42029995;
        double r42029997 = r42029994 - r42029996;
        double r42029998 = r42029993 * r42029997;
        return r42029998;
}

double f(double x) {
        double r42029999 = 3.0;
        double r42030000 = x;
        double r42030001 = 2.0;
        double r42030002 = r42030000 * r42030001;
        double r42030003 = r42029999 - r42030002;
        double r42030004 = r42030003 * r42030000;
        double r42030005 = r42030004 * r42030000;
        return r42030005;
}

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.0 - x \cdot 2.0\right)\right)\]

Derivation

  1. Initial program 0.2

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

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

    \[\leadsto \left(\left(3.0 - x \cdot 2.0\right) \cdot x\right) \cdot x\]

Reproduce

herbie shell --seed 2019162 
(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))))