\left(d1 \cdot 10 + d1 \cdot d2\right) + d1 \cdot 20
1 \cdot \left(d2 \cdot d1\right) + 30 \cdot d1
double f(double d1, double d2) {
double r21131748 = d1;
double r21131749 = 10.0;
double r21131750 = r21131748 * r21131749;
double r21131751 = d2;
double r21131752 = r21131748 * r21131751;
double r21131753 = r21131750 + r21131752;
double r21131754 = 20.0;
double r21131755 = r21131748 * r21131754;
double r21131756 = r21131753 + r21131755;
return r21131756;
}
double f(double d1, double d2) {
double r21131757 = 1.0;
double r21131758 = d2;
double r21131759 = d1;
double r21131760 = r21131758 * r21131759;
double r21131761 = r21131757 * r21131760;
double r21131762 = 30.0;
double r21131763 = r21131762 * r21131759;
double r21131764 = r21131761 + r21131763;
return r21131764;
}




Bits error versus d1




Bits error versus d2
Results
| Original | 0.2 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.2
Simplified0.0
rmApplied flip-+11.3
Applied associate-*r/13.7
Taylor expanded around 0 0.0
Final simplification0.0
herbie shell --seed 2019173
(FPCore (d1 d2)
:name "FastMath test2"
:herbie-target
(* d1 (+ 30.0 d2))
(+ (+ (* d1 10.0) (* d1 d2)) (* d1 20.0)))