\left(a + \left(b + \left(c + d\right)\right)\right) \cdot 2
\sqrt[3]{{\left(\sqrt[3]{{\left(\left(d + a\right) + \left(b + c\right)\right)}^{3}}\right)}^{3}} \cdot 2double code(double a, double b, double c, double d) {
return ((double) (((double) (a + ((double) (b + ((double) (c + d)))))) * 2.0));
}
double code(double a, double b, double c, double d) {
return ((double) (((double) cbrt(((double) pow(((double) cbrt(((double) pow(((double) (((double) (d + a)) + ((double) (b + c)))), 3.0)))), 3.0)))) * 2.0));
}




Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
Results
| Original | 3.7 |
|---|---|
| Target | 3.8 |
| Herbie | 0.7 |
Initial program 3.7
rmApplied associate-+r+2.7
rmApplied add-cbrt-cube2.9
Simplified2.9
rmApplied add-cbrt-cube2.9
Simplified2.9
rmApplied associate-+r+0.7
Final simplification0.7
herbie shell --seed 2020182
(FPCore (a b c d)
:name "Expression, p6"
:precision binary64
:pre (and (<= -14.0 a -13.0) (<= -3.0 b -2.0) (<= 3.0 c 3.5) (<= 12.5 d 13.5))
:herbie-target
(+ (* (+ a b) 2.0) (* (+ c d) 2.0))
(* (+ a (+ b (+ c d))) 2.0))