\left(1 + t \cdot 2 \cdot 10^{-16}\right) \cdot \left(1 + t \cdot 2 \cdot 10^{-16}\right) + \left(-1 - 2 \cdot \left(t \cdot 2 \cdot 10^{-16}\right)\right)\left(2 \cdot 10^{-16} \cdot \left(2 \cdot 10^{-16} \cdot t\right)\right) \cdot tdouble f(double t) {
double r1572238 = 1.0;
double r1572239 = t;
double r1572240 = 2e-16;
double r1572241 = r1572239 * r1572240;
double r1572242 = r1572238 + r1572241;
double r1572243 = r1572242 * r1572242;
double r1572244 = -1.0;
double r1572245 = 2.0;
double r1572246 = r1572245 * r1572241;
double r1572247 = r1572244 - r1572246;
double r1572248 = r1572243 + r1572247;
return r1572248;
}
double f(double t) {
double r1572249 = 2e-16;
double r1572250 = t;
double r1572251 = r1572249 * r1572250;
double r1572252 = r1572249 * r1572251;
double r1572253 = r1572252 * r1572250;
return r1572253;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.6 |
| Herbie | 0.3 |
Initial program 61.8
Simplified0.4
rmApplied associate-*r*0.3
Final simplification0.3
herbie shell --seed 2019152
(FPCore (t)
:name "fma_test1"
:pre (<= 0.9 t 1.1)
:herbie-target
(fma (+ 1 (* t 2e-16)) (+ 1 (* t 2e-16)) (- -1 (* 2 (* t 2e-16))))
(+ (* (+ 1 (* t 2e-16)) (+ 1 (* t 2e-16))) (- -1 (* 2 (* t 2e-16)))))