Average Error: 0.2 → 0.2
Time: 13.8s
Precision: 64
\[\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)\]
\[\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)\]
\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
double f(double x) {
        double r510735 = x;
        double r510736 = r510735 * r510735;
        double r510737 = 3.0;
        double r510738 = 2.0;
        double r510739 = r510735 * r510738;
        double r510740 = r510737 - r510739;
        double r510741 = r510736 * r510740;
        return r510741;
}

double f(double x) {
        double r510742 = x;
        double r510743 = r510742 * r510742;
        double r510744 = 3.0;
        double r510745 = 2.0;
        double r510746 = r510742 * r510745;
        double r510747 = r510744 - r510746;
        double r510748 = r510743 * r510747;
        return r510748;
}

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. Final simplification0.2

    \[\leadsto \left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)\]

Reproduce

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