Average Error: 0.3 → 0.3
Time: 13.9s
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 r480109 = 3.0;
        double r480110 = 2.0;
        double r480111 = x;
        double r480112 = r480111 * r480109;
        double r480113 = r480110 - r480112;
        double r480114 = r480109 * r480113;
        double r480115 = r480114 * r480111;
        return r480115;
}

double f(double x) {
        double r480116 = 3.0;
        double r480117 = 2.0;
        double r480118 = x;
        double r480119 = r480118 * r480116;
        double r480120 = r480117 - r480119;
        double r480121 = r480116 * r480120;
        double r480122 = r480121 * r480118;
        return r480122;
}

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