\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
y \cdot \left(\left(3 \cdot y\right) \cdot x\right)
double f(double x, double y) {
double r37860078 = x;
double r37860079 = 3.0;
double r37860080 = r37860078 * r37860079;
double r37860081 = y;
double r37860082 = r37860080 * r37860081;
double r37860083 = r37860082 * r37860081;
return r37860083;
}
double f(double x, double y) {
double r37860084 = y;
double r37860085 = 3.0;
double r37860086 = r37860085 * r37860084;
double r37860087 = x;
double r37860088 = r37860086 * r37860087;
double r37860089 = r37860084 * r37860088;
return r37860089;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied associate-*r*0.3
Simplified0.3
rmApplied associate-*r*0.2
Final simplification0.2
herbie shell --seed 2019192
(FPCore (x y)
:name "Diagrams.Segment:$catParam from diagrams-lib-1.3.0.3, B"
:herbie-target
(* (* x (* 3.0 y)) y)
(* (* (* x 3.0) y) y))