Average Error: 0.2 → 0.2
Time: 11.6s
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 r37903345 = x;
        double r37903346 = r37903345 * r37903345;
        double r37903347 = 3.0;
        double r37903348 = 2.0;
        double r37903349 = r37903345 * r37903348;
        double r37903350 = r37903347 - r37903349;
        double r37903351 = r37903346 * r37903350;
        return r37903351;
}

double f(double x) {
        double r37903352 = 3.0;
        double r37903353 = x;
        double r37903354 = 2.0;
        double r37903355 = r37903353 * r37903354;
        double r37903356 = r37903352 - r37903355;
        double r37903357 = r37903356 * r37903353;
        double r37903358 = r37903357 * r37903353;
        return r37903358;
}

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