Average Error: 0.2 → 0.2
Time: 2.4s
Precision: 64
\[\left(3 \cdot \left(2 - x \cdot 3\right)\right) \cdot x\]
\[\left(3 \cdot \left(2 - x \cdot 3\right)\right) \cdot x\]
\left(3 \cdot \left(2 - x \cdot 3\right)\right) \cdot x
\left(3 \cdot \left(2 - x \cdot 3\right)\right) \cdot x
double f(double x) {
        double r680604 = 3.0;
        double r680605 = 2.0;
        double r680606 = x;
        double r680607 = r680606 * r680604;
        double r680608 = r680605 - r680607;
        double r680609 = r680604 * r680608;
        double r680610 = r680609 * r680606;
        return r680610;
}

double f(double x) {
        double r680611 = 3.0;
        double r680612 = 2.0;
        double r680613 = x;
        double r680614 = r680613 * r680611;
        double r680615 = r680612 - r680614;
        double r680616 = r680611 * r680615;
        double r680617 = r680616 * r680613;
        return r680617;
}

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
\[6 \cdot x - 9 \cdot \left(x \cdot x\right)\]

Derivation

  1. Initial program 0.2

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

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

Reproduce

herbie shell --seed 2020001 
(FPCore (x)
  :name "Diagrams.Tangent:$catParam from diagrams-lib-1.3.0.3, E"
  :precision binary64

  :herbie-target
  (- (* 6 x) (* 9 (* x x)))

  (* (* 3 (- 2 (* x 3))) x))