a \cdot \left(\left(b + c\right) + d\right)
\left(b + c\right) \cdot a + d \cdot a
double f(double a, double b, double c, double d) {
double r65348 = a;
double r65349 = b;
double r65350 = c;
double r65351 = r65349 + r65350;
double r65352 = d;
double r65353 = r65351 + r65352;
double r65354 = r65348 * r65353;
return r65354;
}
double f(double a, double b, double c, double d) {
double r65355 = b;
double r65356 = c;
double r65357 = r65355 + r65356;
double r65358 = a;
double r65359 = r65357 * r65358;
double r65360 = d;
double r65361 = r65360 * r65358;
double r65362 = r65359 + r65361;
return r65362;
}




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.0 |
Initial program 0.0
rmApplied distribute-lft-in0.0
Simplified0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019322
(FPCore (a b c d)
:name "Expression, p14"
:precision binary64
:pre (and (<= 56789 a 98765) (<= 0.0 b 1) (<= 0.0 c 0.0016773) (<= 0.0 d 0.0016773))
:herbie-target
(+ (* a b) (* a (+ c d)))
(* a (+ (+ b c) d)))