\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 r847075 = x;
double r847076 = 3.0;
double r847077 = r847075 * r847076;
double r847078 = r847077 * r847075;
double r847079 = y;
double r847080 = r847078 * r847079;
return r847080;
}
double f(double x, double y) {
double r847081 = x;
double r847082 = 3.0;
double r847083 = y;
double r847084 = r847081 * r847083;
double r847085 = r847082 * r847084;
double r847086 = r847081 * r847085;
return r847086;
}




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 2020065
(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))