Average Error: 0.3 → 0.3
Time: 21.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 r492423 = x;
        double r492424 = 3.0;
        double r492425 = r492423 * r492424;
        double r492426 = y;
        double r492427 = r492425 * r492426;
        double r492428 = r492427 * r492426;
        return r492428;
}

double f(double x, double y) {
        double r492429 = x;
        double r492430 = 3.0;
        double r492431 = r492429 * r492430;
        double r492432 = y;
        double r492433 = r492431 * r492432;
        double r492434 = r492433 * r492432;
        return r492434;
}

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.3
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 2019325 
(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))