Average Error: 0.3 → 0.3
Time: 13.8s
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 r498451 = 3.0;
        double r498452 = 2.0;
        double r498453 = x;
        double r498454 = r498453 * r498451;
        double r498455 = r498452 - r498454;
        double r498456 = r498451 * r498455;
        double r498457 = r498456 * r498453;
        return r498457;
}

double f(double x) {
        double r498458 = 3.0;
        double r498459 = 2.0;
        double r498460 = x;
        double r498461 = r498460 * r498458;
        double r498462 = r498459 - r498461;
        double r498463 = r498458 * r498462;
        double r498464 = r498463 * r498460;
        return r498464;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.3
Target0.2
Herbie0.3
\[6 \cdot x - 9 \cdot \left(x \cdot x\right)\]

Derivation

  1. Initial program 0.3

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

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

Reproduce

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