\left(\left(x \cdot 3\right) \cdot x\right) \cdot y
x \cdot \left(x \cdot \left(3 \cdot y\right)\right)
double f(double x, double y) {
double r850017 = x;
double r850018 = 3.0;
double r850019 = r850017 * r850018;
double r850020 = r850019 * r850017;
double r850021 = y;
double r850022 = r850020 * r850021;
return r850022;
}
double f(double x, double y) {
double r850023 = x;
double r850024 = 3.0;
double r850025 = y;
double r850026 = r850024 * r850025;
double r850027 = r850023 * r850026;
double r850028 = r850023 * r850027;
return r850028;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.4 |
|---|---|
| Target | 0.2 |
| Herbie | 0.3 |
Initial program 10.4
rmApplied associate-*l*0.2
rmApplied associate-*l*0.2
rmApplied associate-*r*0.3
Simplified0.3
rmApplied associate-*l*0.3
Final simplification0.3
herbie shell --seed 2020047 +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))