Average Error: 0.2 → 0.2
Time: 15.5s
Precision: 64
\[\left(x \cdot x\right) \cdot \left(3.0 - x \cdot 2.0\right)\]
\[\left(3.0 - 2.0 \cdot x\right) \cdot \left(x \cdot x\right)\]
\left(x \cdot x\right) \cdot \left(3.0 - x \cdot 2.0\right)
\left(3.0 - 2.0 \cdot x\right) \cdot \left(x \cdot x\right)
double f(double x) {
        double r38950819 = x;
        double r38950820 = r38950819 * r38950819;
        double r38950821 = 3.0;
        double r38950822 = 2.0;
        double r38950823 = r38950819 * r38950822;
        double r38950824 = r38950821 - r38950823;
        double r38950825 = r38950820 * r38950824;
        return r38950825;
}

double f(double x) {
        double r38950826 = 3.0;
        double r38950827 = 2.0;
        double r38950828 = x;
        double r38950829 = r38950827 * r38950828;
        double r38950830 = r38950826 - r38950829;
        double r38950831 = r38950828 * r38950828;
        double r38950832 = r38950830 * r38950831;
        return r38950832;
}

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.0 - x \cdot 2.0\right)\right)\]

Derivation

  1. Initial program 0.2

    \[\left(x \cdot x\right) \cdot \left(3.0 - x \cdot 2.0\right)\]
  2. Final simplification0.2

    \[\leadsto \left(3.0 - 2.0 \cdot x\right) \cdot \left(x \cdot x\right)\]

Reproduce

herbie shell --seed 2019158 +o rules:numerics
(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))))