\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 r765095 = x;
double r765096 = 3.0;
double r765097 = r765095 * r765096;
double r765098 = r765097 * r765095;
double r765099 = y;
double r765100 = r765098 * r765099;
return r765100;
}
double f(double x, double y) {
double r765101 = x;
double r765102 = 3.0;
double r765103 = y;
double r765104 = r765101 * r765103;
double r765105 = r765102 * r765104;
double r765106 = r765101 * r765105;
return r765106;
}




Bits error versus x




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