\left(a + \left(b + \left(c + d\right)\right)\right) \cdot 2
\sqrt[3]{\left(\left(a + \left(d + \left(c + b\right)\right)\right) \cdot \log \left(e^{c + \left(\left(a + b\right) + d\right)}\right)\right) \cdot \left(\left(\left(c + b\right) + a\right) + d\right)} \cdot 2double f(double a, double b, double c, double d) {
double r24038390 = a;
double r24038391 = b;
double r24038392 = c;
double r24038393 = d;
double r24038394 = r24038392 + r24038393;
double r24038395 = r24038391 + r24038394;
double r24038396 = r24038390 + r24038395;
double r24038397 = 2.0;
double r24038398 = r24038396 * r24038397;
return r24038398;
}
double f(double a, double b, double c, double d) {
double r24038399 = a;
double r24038400 = d;
double r24038401 = c;
double r24038402 = b;
double r24038403 = r24038401 + r24038402;
double r24038404 = r24038400 + r24038403;
double r24038405 = r24038399 + r24038404;
double r24038406 = r24038399 + r24038402;
double r24038407 = r24038406 + r24038400;
double r24038408 = r24038401 + r24038407;
double r24038409 = exp(r24038408);
double r24038410 = log(r24038409);
double r24038411 = r24038405 * r24038410;
double r24038412 = r24038403 + r24038399;
double r24038413 = r24038412 + r24038400;
double r24038414 = r24038411 * r24038413;
double r24038415 = cbrt(r24038414);
double r24038416 = 2.0;
double r24038417 = r24038415 * r24038416;
return r24038417;
}




Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
Results
| Original | 3.7 |
|---|---|
| Target | 3.9 |
| Herbie | 2.7 |
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 add-log-exp2.7
Applied sum-log2.7
Applied sum-log2.6
Applied add-log-exp2.6
Applied sum-log2.3
Simplified2.7
Final simplification2.7
herbie shell --seed 2019119
(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))