\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 r1315399 = x;
double r1315400 = 3.0;
double r1315401 = r1315399 * r1315400;
double r1315402 = r1315401 * r1315399;
double r1315403 = y;
double r1315404 = r1315402 * r1315403;
return r1315404;
}
double f(double x, double y) {
double r1315405 = x;
double r1315406 = 3.0;
double r1315407 = r1315406 * r1315405;
double r1315408 = y;
double r1315409 = r1315407 * r1315408;
double r1315410 = r1315405 * r1315409;
return r1315410;
}




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))