d \cdot 10 + d \cdot 20
d \cdot 30
double f(double d) {
double r31702630 = d;
double r31702631 = 10.0;
double r31702632 = r31702630 * r31702631;
double r31702633 = 20.0;
double r31702634 = r31702630 * r31702633;
double r31702635 = r31702632 + r31702634;
return r31702635;
}
double f(double d) {
double r31702636 = d;
double r31702637 = 30.0;
double r31702638 = r31702636 * r31702637;
return r31702638;
}




Bits error versus d
Results
| Original | 0.3 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 0.3
Simplified0
Final simplification0
herbie shell --seed 2019107 +o rules:numerics
(FPCore (d)
:name "FastMath test1"
:herbie-target
(* d 30)
(+ (* d 10) (* d 20)))