\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
\left(y \cdot x\right) \cdot \left(3 \cdot y\right)
double f(double x, double y) {
double r599715 = x;
double r599716 = 3.0;
double r599717 = r599715 * r599716;
double r599718 = y;
double r599719 = r599717 * r599718;
double r599720 = r599719 * r599718;
return r599720;
}
double f(double x, double y) {
double r599721 = y;
double r599722 = x;
double r599723 = r599721 * r599722;
double r599724 = 3.0;
double r599725 = r599724 * r599721;
double r599726 = r599723 * r599725;
return r599726;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 0.3
rmApplied associate-*l*0.2
Simplified0.2
rmApplied associate-*r*0.2
Simplified0.2
rmApplied associate-*l*0.2
Final simplification0.2
herbie shell --seed 2019306
(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))