\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 r1034160 = x;
double r1034161 = 3.0;
double r1034162 = r1034160 * r1034161;
double r1034163 = r1034162 * r1034160;
double r1034164 = y;
double r1034165 = r1034163 * r1034164;
return r1034165;
}
double f(double x, double y) {
double r1034166 = x;
double r1034167 = 3.0;
double r1034168 = y;
double r1034169 = r1034166 * r1034168;
double r1034170 = r1034167 * r1034169;
double r1034171 = r1034166 * r1034170;
return r1034171;
}




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.3
Final simplification0.3
herbie shell --seed 2020042
(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))