\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)t \cdot \left(t \cdot 3.9999999999999997 \cdot 10^{-32}\right)double f(double t) {
double r70199 = 1.0;
double r70200 = t;
double r70201 = 2e-16;
double r70202 = r70200 * r70201;
double r70203 = r70199 + r70202;
double r70204 = r70203 * r70203;
double r70205 = -1.0;
double r70206 = 2.0;
double r70207 = r70206 * r70202;
double r70208 = r70205 - r70207;
double r70209 = r70204 + r70208;
return r70209;
}
double f(double t) {
double r70210 = t;
double r70211 = 3.9999999999999997e-32;
double r70212 = r70210 * r70211;
double r70213 = r70210 * r70212;
return r70213;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.6 |
| Herbie | 0.3 |
Initial program 61.8
Taylor expanded around 0 0.3
rmApplied sqr-pow0.3
Applied associate-*r*0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2020083
(FPCore (t)
:name "fma_test1"
:precision binary64
: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)))))