\left(\left(x \cdot 3\right) \cdot x\right) \cdot y
\left(\left(x \cdot 3\right) \cdot y\right) \cdot x
double f(double x, double y) {
double r779235 = x;
double r779236 = 3.0;
double r779237 = r779235 * r779236;
double r779238 = r779237 * r779235;
double r779239 = y;
double r779240 = r779238 * r779239;
return r779240;
}
double f(double x, double y) {
double r779241 = x;
double r779242 = 3.0;
double r779243 = r779241 * r779242;
double r779244 = y;
double r779245 = r779243 * r779244;
double r779246 = r779245 * r779241;
return r779246;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 0.3 |
| Herbie | 0.2 |
Initial program 11.0
rmApplied associate-*l*0.3
rmApplied associate-*l*0.2
rmApplied pow10.2
Applied pow10.2
Applied pow-prod-down0.2
Applied pow10.2
Applied pow-prod-down0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2020046 +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))