\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
\left(\left(x \cdot y\right) \cdot y\right) \cdot 3
double f(double x, double y) {
double r30592353 = x;
double r30592354 = 3.0;
double r30592355 = r30592353 * r30592354;
double r30592356 = y;
double r30592357 = r30592355 * r30592356;
double r30592358 = r30592357 * r30592356;
return r30592358;
}
double f(double x, double y) {
double r30592359 = x;
double r30592360 = y;
double r30592361 = r30592359 * r30592360;
double r30592362 = r30592361 * r30592360;
double r30592363 = 3.0;
double r30592364 = r30592362 * r30592363;
return r30592364;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.3 |
Initial program 0.3
rmApplied associate-*l*0.2
rmApplied *-un-lft-identity0.2
Applied associate-*r*0.2
Simplified0.2
rmApplied associate-*l*0.3
Final simplification0.3
herbie shell --seed 2019179 +o rules:numerics
(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))