\left(\left(x \cdot 3\right) \cdot x\right) \cdot y
\left(3 \cdot x\right) \cdot \left(x \cdot y\right)
double f(double x, double y) {
double r812928 = x;
double r812929 = 3.0;
double r812930 = r812928 * r812929;
double r812931 = r812930 * r812928;
double r812932 = y;
double r812933 = r812931 * r812932;
return r812933;
}
double f(double x, double y) {
double r812934 = 3.0;
double r812935 = x;
double r812936 = r812934 * r812935;
double r812937 = y;
double r812938 = r812935 * r812937;
double r812939 = r812936 * r812938;
return r812939;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.6 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
Initial program 10.6
Simplified10.6
rmApplied associate-*l*0.2
Simplified0.3
rmApplied associate-*r*0.2
rmApplied pow10.2
Applied pow10.2
Applied pow10.2
Applied pow-prod-down0.2
Applied pow-prod-down0.2
Applied pow10.2
Applied pow-prod-down0.2
Simplified0.2
rmApplied associate-*l*0.3
Final simplification0.3
herbie shell --seed 2019196 +o rules:numerics
(FPCore (x y)
:name "Diagrams.Segment:$catParam from diagrams-lib-1.3.0.3, A"
:herbie-target
(* (* x 3.0) (* x y))
(* (* (* x 3.0) x) y))