Average Error: 0.3 → 0.3
Time: 2.8s
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 r706508 = x;
        double r706509 = 3.0;
        double r706510 = r706508 * r706509;
        double r706511 = y;
        double r706512 = r706510 * r706511;
        double r706513 = r706512 * r706511;
        return r706513;
}

double f(double x, double y) {
        double r706514 = x;
        double r706515 = 3.0;
        double r706516 = r706514 * r706515;
        double r706517 = y;
        double r706518 = r706516 * r706517;
        double r706519 = r706518 * r706517;
        return r706519;
}

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