Average Error: 0.2 → 0.2
Time: 1.3m
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 r40488048 = x;
        double r40488049 = r40488048 * r40488048;
        double r40488050 = 3.0;
        double r40488051 = 2.0;
        double r40488052 = r40488048 * r40488051;
        double r40488053 = r40488050 - r40488052;
        double r40488054 = r40488049 * r40488053;
        return r40488054;
}

double f(double x) {
        double r40488055 = 3.0;
        double r40488056 = x;
        double r40488057 = 2.0;
        double r40488058 = r40488056 * r40488057;
        double r40488059 = r40488055 - r40488058;
        double r40488060 = r40488059 * r40488056;
        double r40488061 = r40488060 * r40488056;
        return r40488061;
}

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