Average Error: 0.2 → 0.2
Time: 23.5s
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 r25244297 = x;
        double r25244298 = r25244297 * r25244297;
        double r25244299 = 3.0;
        double r25244300 = 2.0;
        double r25244301 = r25244297 * r25244300;
        double r25244302 = r25244299 - r25244301;
        double r25244303 = r25244298 * r25244302;
        return r25244303;
}

double f(double x) {
        double r25244304 = 3.0;
        double r25244305 = x;
        double r25244306 = 2.0;
        double r25244307 = r25244305 * r25244306;
        double r25244308 = r25244304 - r25244307;
        double r25244309 = r25244308 * r25244305;
        double r25244310 = r25244309 * r25244305;
        return r25244310;
}

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