\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(\left(t \cdot \sqrt{3.9999999999999997 \cdot 10^{-32}}\right) \cdot t\right) \cdot \sqrt{3.9999999999999997 \cdot 10^{-32}}double f(double t) {
double r12239727 = 1.0;
double r12239728 = t;
double r12239729 = 2e-16;
double r12239730 = r12239728 * r12239729;
double r12239731 = r12239727 + r12239730;
double r12239732 = r12239731 * r12239731;
double r12239733 = -1.0;
double r12239734 = 2.0;
double r12239735 = r12239734 * r12239730;
double r12239736 = r12239733 - r12239735;
double r12239737 = r12239732 + r12239736;
return r12239737;
}
double f(double t) {
double r12239738 = t;
double r12239739 = 3.9999999999999997e-32;
double r12239740 = sqrt(r12239739);
double r12239741 = r12239738 * r12239740;
double r12239742 = r12239741 * r12239738;
double r12239743 = r12239742 * r12239740;
return r12239743;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.6 |
| Herbie | 0.3 |
Initial program 61.8
Simplified61.8
Taylor expanded around 0 0.3
Simplified0.3
rmApplied add-sqr-sqrt0.3
Applied associate-*r*0.4
rmApplied associate-*l*0.3
Final simplification0.3
herbie shell --seed 2019125
(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)))))