\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(3.9999999999999997 \cdot 10^{-32} \cdot t\right) \cdot tdouble f(double t) {
double r2509193 = 1.0;
double r2509194 = t;
double r2509195 = 2e-16;
double r2509196 = r2509194 * r2509195;
double r2509197 = r2509193 + r2509196;
double r2509198 = r2509197 * r2509197;
double r2509199 = -1.0;
double r2509200 = 2.0;
double r2509201 = r2509200 * r2509196;
double r2509202 = r2509199 - r2509201;
double r2509203 = r2509198 + r2509202;
return r2509203;
}
double f(double t) {
double r2509204 = 3.9999999999999997e-32;
double r2509205 = t;
double r2509206 = r2509204 * r2509205;
double r2509207 = r2509206 * r2509205;
return r2509207;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.6 |
| Herbie | 0.3 |
Initial program 61.8
Simplified0.4
Taylor expanded around inf 0.3
Simplified0.3
rmApplied associate-*r*0.3
Final simplification0.3
herbie shell --seed 2019141
(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)))))