\left(a + \left(b + \left(c + d\right)\right)\right) \cdot 2
\sqrt[3]{\left(\left(\left(\left(b + c\right) + d\right) + a\right) \cdot \left(\left(\left(b + c\right) + a\right) + d\right)\right) \cdot \log \left(e^{a} \cdot e^{\left(b + c\right) + d}\right)} \cdot 2double f(double a, double b, double c, double d) {
double r2299202 = a;
double r2299203 = b;
double r2299204 = c;
double r2299205 = d;
double r2299206 = r2299204 + r2299205;
double r2299207 = r2299203 + r2299206;
double r2299208 = r2299202 + r2299207;
double r2299209 = 2.0;
double r2299210 = r2299208 * r2299209;
return r2299210;
}
double f(double a, double b, double c, double d) {
double r2299211 = b;
double r2299212 = c;
double r2299213 = r2299211 + r2299212;
double r2299214 = d;
double r2299215 = r2299213 + r2299214;
double r2299216 = a;
double r2299217 = r2299215 + r2299216;
double r2299218 = r2299213 + r2299216;
double r2299219 = r2299218 + r2299214;
double r2299220 = r2299217 * r2299219;
double r2299221 = exp(r2299216);
double r2299222 = exp(r2299215);
double r2299223 = r2299221 * r2299222;
double r2299224 = log(r2299223);
double r2299225 = r2299220 * r2299224;
double r2299226 = cbrt(r2299225);
double r2299227 = 2.0;
double r2299228 = r2299226 * r2299227;
return r2299228;
}




Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
Results
| Original | 3.7 |
|---|---|
| Target | 3.8 |
| Herbie | 2.8 |
Initial program 3.7
rmApplied associate-+r+2.8
rmApplied add-cbrt-cube2.9
rmApplied associate-+r+2.7
rmApplied add-log-exp2.7
Applied add-log-exp2.7
Applied sum-log2.8
Final simplification2.8
herbie shell --seed 2019132
(FPCore (a b c d)
:name "Expression, p6"
:pre (and (<= -14 a -13) (<= -3 b -2) (<= 3 c 3.5) (<= 12.5 d 13.5))
:herbie-target
(+ (* (+ a b) 2) (* (+ c d) 2))
(* (+ a (+ b (+ c d))) 2))