Average Error: 10.7 → 0.2
Time: 7.7s
Precision: 64
\[\left(\left(x \cdot 3\right) \cdot x\right) \cdot y\]
\[\left(y \cdot x\right) \cdot \left(x \cdot 3\right)\]
\left(\left(x \cdot 3\right) \cdot x\right) \cdot y
\left(y \cdot x\right) \cdot \left(x \cdot 3\right)
double f(double x, double y) {
        double r36801833 = x;
        double r36801834 = 3.0;
        double r36801835 = r36801833 * r36801834;
        double r36801836 = r36801835 * r36801833;
        double r36801837 = y;
        double r36801838 = r36801836 * r36801837;
        return r36801838;
}

double f(double x, double y) {
        double r36801839 = y;
        double r36801840 = x;
        double r36801841 = r36801839 * r36801840;
        double r36801842 = 3.0;
        double r36801843 = r36801840 * r36801842;
        double r36801844 = r36801841 * r36801843;
        return r36801844;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original10.7
Target0.2
Herbie0.2
\[\left(x \cdot 3\right) \cdot \left(x \cdot y\right)\]

Derivation

  1. Initial program 10.7

    \[\left(\left(x \cdot 3\right) \cdot x\right) \cdot y\]
  2. Using strategy rm
  3. Applied associate-*l*0.2

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

    \[\leadsto \left(y \cdot x\right) \cdot \left(x \cdot 3\right)\]

Reproduce

herbie shell --seed 2019171 
(FPCore (x y)
  :name "Diagrams.Segment:$catParam from diagrams-lib-1.3.0.3, A"

  :herbie-target
  (* (* x 3.0) (* x y))

  (* (* (* x 3.0) x) y))