\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 r2455173 = 1.0;
double r2455174 = t;
double r2455175 = 2e-16;
double r2455176 = r2455174 * r2455175;
double r2455177 = r2455173 + r2455176;
double r2455178 = r2455177 * r2455177;
double r2455179 = -1.0;
double r2455180 = 2.0;
double r2455181 = r2455180 * r2455176;
double r2455182 = r2455179 - r2455181;
double r2455183 = r2455178 + r2455182;
return r2455183;
}
double f(double t) {
double r2455184 = 2e-16;
double r2455185 = t;
double r2455186 = r2455184 * r2455185;
double r2455187 = r2455184 * r2455186;
double r2455188 = r2455187 * r2455185;
return r2455188;
}




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