\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
y \cdot \left(x \cdot \left(3 \cdot y\right)\right)
double f(double x, double y) {
double r599751 = x;
double r599752 = 3.0;
double r599753 = r599751 * r599752;
double r599754 = y;
double r599755 = r599753 * r599754;
double r599756 = r599755 * r599754;
return r599756;
}
double f(double x, double y) {
double r599757 = y;
double r599758 = x;
double r599759 = 3.0;
double r599760 = r599759 * r599757;
double r599761 = r599758 * r599760;
double r599762 = r599757 * r599761;
return r599762;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.3 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
Initial program 0.3
rmApplied associate-*l*0.3
Simplified0.3
rmApplied associate-*r*0.3
Simplified0.3
rmApplied associate-*l*0.2
rmApplied associate-*l*0.3
Final simplification0.3
herbie shell --seed 2019323
(FPCore (x y)
:name "Diagrams.Segment:$catParam from diagrams-lib-1.3.0.3, B"
:precision binary64
:herbie-target
(* (* x (* 3 y)) y)
(* (* (* x 3) y) y))