Average Error: 0.2 → 0.2
Time: 12.1s
Precision: 64
\[\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)\]
\[\left(3 - 2 \cdot x\right) \cdot \left(x \cdot x\right)\]
\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
\left(3 - 2 \cdot x\right) \cdot \left(x \cdot x\right)
double f(double x) {
        double r36176126 = x;
        double r36176127 = r36176126 * r36176126;
        double r36176128 = 3.0;
        double r36176129 = 2.0;
        double r36176130 = r36176126 * r36176129;
        double r36176131 = r36176128 - r36176130;
        double r36176132 = r36176127 * r36176131;
        return r36176132;
}

double f(double x) {
        double r36176133 = 3.0;
        double r36176134 = 2.0;
        double r36176135 = x;
        double r36176136 = r36176134 * r36176135;
        double r36176137 = r36176133 - r36176136;
        double r36176138 = r36176135 * r36176135;
        double r36176139 = r36176137 * r36176138;
        return r36176139;
}

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

Reproduce

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