\left(\left(x \cdot 3\right) \cdot x\right) \cdot y
x \cdot \left(\left(3 \cdot y\right) \cdot x\right)
double f(double x, double y) {
double r600656 = x;
double r600657 = 3.0;
double r600658 = r600656 * r600657;
double r600659 = r600658 * r600656;
double r600660 = y;
double r600661 = r600659 * r600660;
return r600661;
}
double f(double x, double y) {
double r600662 = x;
double r600663 = 3.0;
double r600664 = y;
double r600665 = r600663 * r600664;
double r600666 = r600665 * r600662;
double r600667 = r600662 * r600666;
return r600667;
}




Bits error versus x




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