double f(double a, double b, double c, double d) {
double r11212165 = a;
double r11212166 = b;
double r11212167 = c;
double r11212168 = d;
double r11212169 = r11212167 + r11212168;
double r11212170 = r11212166 + r11212169;
double r11212171 = r11212165 + r11212170;
double r11212172 = 2.0;
double r11212173 = r11212171 * r11212172;
return r11212173;
}
double f(double a, double b, double c, double d) {
double r11212174 = 2.0;
double r11212175 = a;
double r11212176 = d;
double r11212177 = c;
double r11212178 = b;
double r11212179 = r11212177 + r11212178;
double r11212180 = r11212176 + r11212179;
double r11212181 = r11212175 + r11212180;
double r11212182 = r11212178 + r11212176;
double r11212183 = r11212177 + r11212175;
double r11212184 = r11212182 + r11212183;
double r11212185 = exp(r11212184);
double r11212186 = log(r11212185);
double r11212187 = r11212181 * r11212186;
double r11212188 = r11212181 * r11212187;
double r11212189 = cbrt(r11212188);
double r11212190 = r11212174 * r11212189;
return r11212190;
}
\left(a + \left(b + \left(c + d\right)\right)\right) \cdot 2
2 \cdot \sqrt[3]{\left(a + \left(d + \left(c + b\right)\right)\right) \cdot \left(\left(a + \left(d + \left(c + b\right)\right)\right) \cdot \log \left(e^{\left(b + d\right) + \left(c + a\right)}\right)\right)}



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
| Original | 3.7 |
|---|---|
| Target | 3.8 |
| Herbie | 2.7 |
Initial program 3.7
rmApplied associate-+r+2.7
rmApplied add-cbrt-cube2.9
rmApplied associate-+r+2.7
rmApplied add-log-exp2.7
Applied add-log-exp2.7
Applied sum-log2.8
Simplified2.7
Final simplification2.7
herbie shell --seed 2019101
(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))