\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 r753828 = x;
double r753829 = 3.0;
double r753830 = r753828 * r753829;
double r753831 = r753830 * r753828;
double r753832 = y;
double r753833 = r753831 * r753832;
return r753833;
}
double f(double x, double y) {
double r753834 = x;
double r753835 = 3.0;
double r753836 = y;
double r753837 = r753834 * r753836;
double r753838 = r753835 * r753837;
double r753839 = r753834 * r753838;
return r753839;
}




Bits error versus x




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