\left(\left(x \cdot 3\right) \cdot x\right) \cdot y
x \cdot \left(\left(3 \cdot x\right) \cdot y\right)
double f(double x, double y) {
double r4602 = x;
double r4603 = 3.0;
double r4604 = r4602 * r4603;
double r4605 = r4604 * r4602;
double r4606 = y;
double r4607 = r4605 * r4606;
return r4607;
}
double f(double x, double y) {
double r4608 = x;
double r4609 = 3.0;
double r4610 = r4609 * r4608;
double r4611 = y;
double r4612 = r4610 * r4611;
double r4613 = r4608 * r4612;
return r4613;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 11.0
rmApplied associate-*l*0.2
rmApplied associate-*l*0.2
rmApplied associate-*r*0.2
Final simplification0.2
herbie shell --seed 2020025 +o rules:numerics
(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))