a \cdot \left(\left(b + c\right) + d\right)
a \cdot \left(\left(c + d\right) + b\right)
double f(double a, double b, double c, double d) {
double r68880 = a;
double r68881 = b;
double r68882 = c;
double r68883 = r68881 + r68882;
double r68884 = d;
double r68885 = r68883 + r68884;
double r68886 = r68880 * r68885;
return r68886;
}
double f(double a, double b, double c, double d) {
double r68887 = a;
double r68888 = c;
double r68889 = d;
double r68890 = r68888 + r68889;
double r68891 = b;
double r68892 = r68890 + r68891;
double r68893 = r68887 * r68892;
return r68893;
}




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
Taylor expanded around inf 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020057
(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)))