Average Error: 0.2 → 0.2
Time: 2.2s
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 r942633 = x;
        double r942634 = r942633 * r942633;
        double r942635 = 3.0;
        double r942636 = 2.0;
        double r942637 = r942633 * r942636;
        double r942638 = r942635 - r942637;
        double r942639 = r942634 * r942638;
        return r942639;
}

double f(double x) {
        double r942640 = x;
        double r942641 = r942640 * r942640;
        double r942642 = 3.0;
        double r942643 = 2.0;
        double r942644 = r942640 * r942643;
        double r942645 = r942642 - r942644;
        double r942646 = r942641 * r942645;
        return r942646;
}

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 2019362 
(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))))