Average Error: 0.2 → 0.2
Time: 25.6s
Precision: 64
\[\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)\]
\[x \cdot \left(x \cdot \left(3 - x \cdot 2\right)\right)\]
\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
x \cdot \left(x \cdot \left(3 - x \cdot 2\right)\right)
double f(double x) {
        double r418044216 = x;
        double r418044217 = r418044216 * r418044216;
        double r418044218 = 3.0;
        double r418044219 = 2.0;
        double r418044220 = r418044216 * r418044219;
        double r418044221 = r418044218 - r418044220;
        double r418044222 = r418044217 * r418044221;
        return r418044222;
}

double f(double x) {
        double r418044223 = x;
        double r418044224 = 3.0;
        double r418044225 = 2.0;
        double r418044226 = r418044223 * r418044225;
        double r418044227 = r418044224 - r418044226;
        double r418044228 = r418044223 * r418044227;
        double r418044229 = r418044223 * r418044228;
        return r418044229;
}

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 x \cdot \left(x \cdot \left(3 - x \cdot 2\right)\right)\]

Reproduce

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