Average Error: 0.3 → 0.2
Time: 17.6s
Precision: 64
\[\left(\left(x \cdot 3\right) \cdot y\right) \cdot y\]
\[\left(3 \cdot \left(x \cdot y\right)\right) \cdot y\]
\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
\left(3 \cdot \left(x \cdot y\right)\right) \cdot y
double f(double x, double y) {
        double r818184 = x;
        double r818185 = 3.0;
        double r818186 = r818184 * r818185;
        double r818187 = y;
        double r818188 = r818186 * r818187;
        double r818189 = r818188 * r818187;
        return r818189;
}

double f(double x, double y) {
        double r818190 = 3.0;
        double r818191 = x;
        double r818192 = y;
        double r818193 = r818191 * r818192;
        double r818194 = r818190 * r818193;
        double r818195 = r818194 * r818192;
        return r818195;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

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

Derivation

  1. Initial program 0.3

    \[\left(\left(x \cdot 3\right) \cdot y\right) \cdot y\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.3

    \[\leadsto \left(\left(x \cdot 3\right) \cdot y\right) \cdot \color{blue}{\left(1 \cdot y\right)}\]
  4. Applied associate-*r*0.3

    \[\leadsto \color{blue}{\left(\left(\left(x \cdot 3\right) \cdot y\right) \cdot 1\right) \cdot y}\]
  5. Simplified0.2

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

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

Reproduce

herbie shell --seed 2020042 
(FPCore (x y)
  :name "Diagrams.Segment:$catParam from diagrams-lib-1.3.0.3, B"
  :precision binary64

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

  (* (* (* x 3) y) y))