\left(a + \left(b + \left(c + d\right)\right)\right) \cdot 2
2 \cdot \sqrt[3]{\log \left(e^{\left(a + c\right) + \left(b + d\right)}\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 r1995972 = a;
double r1995973 = b;
double r1995974 = c;
double r1995975 = d;
double r1995976 = r1995974 + r1995975;
double r1995977 = r1995973 + r1995976;
double r1995978 = r1995972 + r1995977;
double r1995979 = 2.0;
double r1995980 = r1995978 * r1995979;
return r1995980;
}
double f(double a, double b, double c, double d) {
double r1995981 = 2.0;
double r1995982 = a;
double r1995983 = c;
double r1995984 = r1995982 + r1995983;
double r1995985 = b;
double r1995986 = d;
double r1995987 = r1995985 + r1995986;
double r1995988 = r1995984 + r1995987;
double r1995989 = exp(r1995988);
double r1995990 = log(r1995989);
double r1995991 = r1995985 + r1995983;
double r1995992 = r1995991 + r1995986;
double r1995993 = r1995992 + r1995982;
double r1995994 = r1995993 * r1995993;
double r1995995 = r1995990 * r1995994;
double r1995996 = cbrt(r1995995);
double r1995997 = r1995981 * r1995996;
return r1995997;
}




Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
Results
| Original | 3.6 |
|---|---|
| Target | 3.8 |
| Herbie | 2.7 |
Initial program 3.6
rmApplied associate-+r+2.7
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.7
rmApplied associate-+l+2.7
Final simplification2.7
herbie shell --seed 2019128
(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))