\left(\left(x \cdot 3\right) \cdot x\right) \cdot y
\left(\left(y \cdot 3\right) \cdot x\right) \cdot x
double f(double x, double y) {
double r866294 = x;
double r866295 = 3.0;
double r866296 = r866294 * r866295;
double r866297 = r866296 * r866294;
double r866298 = y;
double r866299 = r866297 * r866298;
return r866299;
}
double f(double x, double y) {
double r866300 = y;
double r866301 = 3.0;
double r866302 = r866300 * r866301;
double r866303 = x;
double r866304 = r866302 * r866303;
double r866305 = r866304 * r866303;
return r866305;
}




Bits error versus x




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