\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 r854674 = x;
double r854675 = 3.0;
double r854676 = r854674 * r854675;
double r854677 = r854676 * r854674;
double r854678 = y;
double r854679 = r854677 * r854678;
return r854679;
}
double f(double x, double y) {
double r854680 = x;
double r854681 = 3.0;
double r854682 = y;
double r854683 = r854680 * r854682;
double r854684 = r854681 * r854683;
double r854685 = r854680 * r854684;
return r854685;
}




Bits error versus x




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