\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 r2391284 = 1.0;
double r2391285 = t;
double r2391286 = 2e-16;
double r2391287 = r2391285 * r2391286;
double r2391288 = r2391284 + r2391287;
double r2391289 = r2391288 * r2391288;
double r2391290 = -1.0;
double r2391291 = 2.0;
double r2391292 = r2391291 * r2391287;
double r2391293 = r2391290 - r2391292;
double r2391294 = r2391289 + r2391293;
return r2391294;
}
double f(double t) {
double r2391295 = 2e-16;
double r2391296 = t;
double r2391297 = r2391295 * r2391296;
double r2391298 = r2391295 * r2391297;
double r2391299 = r2391298 * r2391296;
return r2391299;
}




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 2019142
(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)))))