\left(\left(x \cdot 3\right) \cdot x\right) \cdot y
x \cdot \left(3 \cdot \left(x \cdot y\right)\right)
double f(double x, double y) {
double r541124 = x;
double r541125 = 3.0;
double r541126 = r541124 * r541125;
double r541127 = r541126 * r541124;
double r541128 = y;
double r541129 = r541127 * r541128;
return r541129;
}
double f(double x, double y) {
double r541130 = x;
double r541131 = 3.0;
double r541132 = y;
double r541133 = r541130 * r541132;
double r541134 = r541131 * r541133;
double r541135 = r541130 * r541134;
return r541135;
}




Bits error versus x




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