\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 r549501 = x;
double r549502 = 3.0;
double r549503 = r549501 * r549502;
double r549504 = r549503 * r549501;
double r549505 = y;
double r549506 = r549504 * r549505;
return r549506;
}
double f(double x, double y) {
double r549507 = x;
double r549508 = 3.0;
double r549509 = y;
double r549510 = r549508 * r549509;
double r549511 = r549510 * r549507;
double r549512 = r549507 * r549511;
return r549512;
}




Bits error versus x




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