Average Error: 0.2 → 0.2
Time: 13.8s
Precision: 64
\[\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)\]
\[x \cdot \left(\left(3 - 2 \cdot x\right) \cdot x\right)\]
\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
x \cdot \left(\left(3 - 2 \cdot x\right) \cdot x\right)
double f(double x) {
        double r514979 = x;
        double r514980 = r514979 * r514979;
        double r514981 = 3.0;
        double r514982 = 2.0;
        double r514983 = r514979 * r514982;
        double r514984 = r514981 - r514983;
        double r514985 = r514980 * r514984;
        return r514985;
}

double f(double x) {
        double r514986 = x;
        double r514987 = 3.0;
        double r514988 = 2.0;
        double r514989 = r514988 * r514986;
        double r514990 = r514987 - r514989;
        double r514991 = r514990 * r514986;
        double r514992 = r514986 * r514991;
        return r514992;
}

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. Simplified0.2

    \[\leadsto x \cdot \color{blue}{\left(\left(3 - 2 \cdot x\right) \cdot x\right)}\]
  5. Final simplification0.2

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

Reproduce

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