a \cdot \left(\left(b + c\right) + d\right)
\left(\left(b - d\right) - c\right) \cdot \frac{a}{\frac{c + \left(b - d\right)}{c + \left(d + b\right)} \cdot \frac{\left(b - d\right) - c}{c + \left(b - d\right)}}double f(double a, double b, double c, double d) {
double r2688220 = a;
double r2688221 = b;
double r2688222 = c;
double r2688223 = r2688221 + r2688222;
double r2688224 = d;
double r2688225 = r2688223 + r2688224;
double r2688226 = r2688220 * r2688225;
return r2688226;
}
double f(double a, double b, double c, double d) {
double r2688227 = b;
double r2688228 = d;
double r2688229 = r2688227 - r2688228;
double r2688230 = c;
double r2688231 = r2688229 - r2688230;
double r2688232 = a;
double r2688233 = r2688230 + r2688229;
double r2688234 = r2688228 + r2688227;
double r2688235 = r2688230 + r2688234;
double r2688236 = r2688233 / r2688235;
double r2688237 = r2688231 / r2688233;
double r2688238 = r2688236 * r2688237;
double r2688239 = r2688232 / r2688238;
double r2688240 = r2688231 * r2688239;
return r2688240;
}




Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.1 |
Initial program 0.0
rmApplied add-sqr-sqrt0.5
Applied add-sqr-sqrt0.7
Applied unswap-sqr0.8
rmApplied flip-+7.6
Applied sqrt-div26.4
Applied associate-*r/26.4
Applied flip-+26.4
Applied sqrt-div26.5
Applied associate-*r/26.5
Applied frac-times26.5
Simplified26.4
Simplified7.2
rmApplied flip-+7.2
Applied associate-/r/7.0
Simplified0.1
Final simplification0.1
herbie shell --seed 2019143
(FPCore (a b c d)
:name "Expression, p14"
:pre (and (<= 56789 a 98765) (<= 0 b 1) (<= 0 c 0.0016773) (<= 0 d 0.0016773))
:herbie-target
(+ (* a b) (* a (+ c d)))
(* a (+ (+ b c) d)))