a \cdot \left(\left(b + c\right) + d\right)
b \cdot a + a \cdot \left(c + d\right)
double f(double a, double b, double c, double d) {
double r66257 = a;
double r66258 = b;
double r66259 = c;
double r66260 = r66258 + r66259;
double r66261 = d;
double r66262 = r66260 + r66261;
double r66263 = r66257 * r66262;
return r66263;
}
double f(double a, double b, double c, double d) {
double r66264 = b;
double r66265 = a;
double r66266 = r66264 * r66265;
double r66267 = c;
double r66268 = d;
double r66269 = r66267 + r66268;
double r66270 = r66265 * r66269;
double r66271 = r66266 + r66270;
return r66271;
}




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
rmApplied distribute-rgt-in0.0
Applied associate-+l+0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020047
(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)))