\left(a + \left(b + \left(c + d\right)\right)\right) \cdot 2
2 \cdot \sqrt[3]{\log \left(e^{\left(b + \left(a + d\right)\right) + c}\right) \cdot \left(\left(\left(\left(b + c\right) + d\right) + a\right) \cdot \left(\left(\left(b + c\right) + d\right) + a\right)\right)}double f(double a, double b, double c, double d) {
double r12382636 = a;
double r12382637 = b;
double r12382638 = c;
double r12382639 = d;
double r12382640 = r12382638 + r12382639;
double r12382641 = r12382637 + r12382640;
double r12382642 = r12382636 + r12382641;
double r12382643 = 2.0;
double r12382644 = r12382642 * r12382643;
return r12382644;
}
double f(double a, double b, double c, double d) {
double r12382645 = 2.0;
double r12382646 = b;
double r12382647 = a;
double r12382648 = d;
double r12382649 = r12382647 + r12382648;
double r12382650 = r12382646 + r12382649;
double r12382651 = c;
double r12382652 = r12382650 + r12382651;
double r12382653 = exp(r12382652);
double r12382654 = log(r12382653);
double r12382655 = r12382646 + r12382651;
double r12382656 = r12382655 + r12382648;
double r12382657 = r12382656 + r12382647;
double r12382658 = r12382657 * r12382657;
double r12382659 = r12382654 * r12382658;
double r12382660 = cbrt(r12382659);
double r12382661 = r12382645 * r12382660;
return r12382661;
}




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.6 |
Initial program 3.7
rmApplied associate-+r+2.8
rmApplied add-cbrt-cube2.9
rmApplied add-log-exp2.9
Applied add-log-exp2.9
Applied add-log-exp2.9
Applied sum-log2.8
Applied sum-log2.7
Applied add-log-exp2.7
Applied sum-log2.6
Simplified2.9
rmApplied associate-+r+2.6
Final simplification2.6
herbie shell --seed 2019124
(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))