\left(\left(x \cdot 3\right) \cdot x\right) \cdot y
x \cdot \left(\left(x \cdot 3\right) \cdot y\right)
double f(double x, double y) {
double r520645 = x;
double r520646 = 3.0;
double r520647 = r520645 * r520646;
double r520648 = r520647 * r520645;
double r520649 = y;
double r520650 = r520648 * r520649;
return r520650;
}
double f(double x, double y) {
double r520651 = x;
double r520652 = 3.0;
double r520653 = r520651 * r520652;
double r520654 = y;
double r520655 = r520653 * r520654;
double r520656 = r520651 * r520655;
return r520656;
}




Bits error versus x




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