d \cdot 10 + d \cdot 20
30 \cdot d
double f(double d) {
double r255754 = d;
double r255755 = 10.0;
double r255756 = r255754 * r255755;
double r255757 = 20.0;
double r255758 = r255754 * r255757;
double r255759 = r255756 + r255758;
return r255759;
}
double f(double d) {
double r255760 = 30.0;
double r255761 = d;
double r255762 = r255760 * r255761;
return r255762;
}




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