Average Error: 0.3 → 0.3
Time: 9.3s
Precision: 64
\[\left(\left(x \cdot 3\right) \cdot y\right) \cdot y\]
\[\left(\left(x \cdot 3\right) \cdot y\right) \cdot y\]
\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
double f(double x, double y) {
        double r516284 = x;
        double r516285 = 3.0;
        double r516286 = r516284 * r516285;
        double r516287 = y;
        double r516288 = r516286 * r516287;
        double r516289 = r516288 * r516287;
        return r516289;
}

double f(double x, double y) {
        double r516290 = x;
        double r516291 = 3.0;
        double r516292 = r516290 * r516291;
        double r516293 = y;
        double r516294 = r516292 * r516293;
        double r516295 = r516294 * r516293;
        return r516295;
}

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.3
\[\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. Final simplification0.3

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

Reproduce

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