Average Error: 0.3 → 0.2
Time: 7.2s
Precision: 64
\[\left(\left(x \cdot 3\right) \cdot y\right) \cdot y\]
\[\left(x \cdot \left(y \cdot 3\right)\right) \cdot y\]
\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
\left(x \cdot \left(y \cdot 3\right)\right) \cdot y
double f(double x, double y) {
        double r615515 = x;
        double r615516 = 3.0;
        double r615517 = r615515 * r615516;
        double r615518 = y;
        double r615519 = r615517 * r615518;
        double r615520 = r615519 * r615518;
        return r615520;
}

double f(double x, double y) {
        double r615521 = x;
        double r615522 = y;
        double r615523 = 3.0;
        double r615524 = r615522 * r615523;
        double r615525 = r615521 * r615524;
        double r615526 = r615525 * r615522;
        return r615526;
}

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 associate-*l*0.2

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

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

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

Reproduce

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