\left(\left(x \cdot 3\right) \cdot x\right) \cdot y
x \cdot \left(\left(3 \cdot y\right) \cdot x\right)
double f(double x, double y) {
double r472139 = x;
double r472140 = 3.0;
double r472141 = r472139 * r472140;
double r472142 = r472141 * r472139;
double r472143 = y;
double r472144 = r472142 * r472143;
return r472144;
}
double f(double x, double y) {
double r472145 = x;
double r472146 = 3.0;
double r472147 = y;
double r472148 = r472146 * r472147;
double r472149 = r472148 * r472145;
double r472150 = r472145 * r472149;
return r472150;
}




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
Simplified0.2
rmApplied associate-*l*0.2
rmApplied associate-*r*0.3
Final simplification0.3
herbie shell --seed 2019325
(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))