Average Error: 0.2 → 0.2
Time: 12.3s
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 r33985491 = x;
        double r33985492 = r33985491 * r33985491;
        double r33985493 = 3.0;
        double r33985494 = 2.0;
        double r33985495 = r33985491 * r33985494;
        double r33985496 = r33985493 - r33985495;
        double r33985497 = r33985492 * r33985496;
        return r33985497;
}

double f(double x) {
        double r33985498 = 3.0;
        double r33985499 = 2.0;
        double r33985500 = x;
        double r33985501 = r33985499 * r33985500;
        double r33985502 = r33985498 - r33985501;
        double r33985503 = r33985500 * r33985500;
        double r33985504 = r33985502 * r33985503;
        return r33985504;
}

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 +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))))