\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 r527825 = x;
double r527826 = 3.0;
double r527827 = r527825 * r527826;
double r527828 = r527827 * r527825;
double r527829 = y;
double r527830 = r527828 * r527829;
return r527830;
}
double f(double x, double y) {
double r527831 = x;
double r527832 = 3.0;
double r527833 = y;
double r527834 = r527832 * r527833;
double r527835 = r527834 * r527831;
double r527836 = r527831 * r527835;
return r527836;
}




Bits error versus x




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