Average Error: 0.2 → 0.2
Time: 49.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 r36172871 = x;
        double r36172872 = r36172871 * r36172871;
        double r36172873 = 3.0;
        double r36172874 = 2.0;
        double r36172875 = r36172871 * r36172874;
        double r36172876 = r36172873 - r36172875;
        double r36172877 = r36172872 * r36172876;
        return r36172877;
}

double f(double x) {
        double r36172878 = 3.0;
        double r36172879 = x;
        double r36172880 = 2.0;
        double r36172881 = r36172879 * r36172880;
        double r36172882 = r36172878 - r36172881;
        double r36172883 = r36172882 * r36172879;
        double r36172884 = r36172883 * r36172879;
        return r36172884;
}

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 2019200 +o rules:numerics
(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))))