\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 r884766 = x;
double r884767 = 3.0;
double r884768 = r884766 * r884767;
double r884769 = r884768 * r884766;
double r884770 = y;
double r884771 = r884769 * r884770;
return r884771;
}
double f(double x, double y) {
double r884772 = x;
double r884773 = 3.0;
double r884774 = y;
double r884775 = r884772 * r884774;
double r884776 = r884773 * r884775;
double r884777 = r884772 * r884776;
return r884777;
}




Bits error versus x




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