Average Error: 0.3 → 0.3
Time: 19.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 r482606 = x;
        double r482607 = 3.0;
        double r482608 = r482606 * r482607;
        double r482609 = y;
        double r482610 = r482608 * r482609;
        double r482611 = r482610 * r482609;
        return r482611;
}

double f(double x, double y) {
        double r482612 = x;
        double r482613 = 3.0;
        double r482614 = r482612 * r482613;
        double r482615 = y;
        double r482616 = r482614 * r482615;
        double r482617 = r482616 * r482615;
        return r482617;
}

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))