\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 r844278 = x;
double r844279 = 3.0;
double r844280 = r844278 * r844279;
double r844281 = r844280 * r844278;
double r844282 = y;
double r844283 = r844281 * r844282;
return r844283;
}
double f(double x, double y) {
double r844284 = x;
double r844285 = 3.0;
double r844286 = y;
double r844287 = r844284 * r844286;
double r844288 = r844285 * r844287;
double r844289 = r844284 * r844288;
return r844289;
}




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))