Average Error: 0.2 → 0.2
Time: 12.2s
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 r637202 = x;
        double r637203 = r637202 * r637202;
        double r637204 = 3.0;
        double r637205 = 2.0;
        double r637206 = r637202 * r637205;
        double r637207 = r637204 - r637206;
        double r637208 = r637203 * r637207;
        return r637208;
}

double f(double x) {
        double r637209 = x;
        double r637210 = 3.0;
        double r637211 = 2.0;
        double r637212 = r637209 * r637211;
        double r637213 = r637210 - r637212;
        double r637214 = r637209 * r637213;
        double r637215 = r637209 * r637214;
        return r637215;
}

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 2019305 
(FPCore (x)
  :name "Data.Spline.Key:interpolateKeys from smoothie-0.4.0.2"
  :precision binary64

  :herbie-target
  (* x (* x (- 3 (* x 2))))

  (* (* x x) (- 3 (* x 2))))