\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(t \cdot 3.9999999999999997 \cdot 10^{-32}\right) \cdot tdouble f(double t) {
double r54813 = 1.0;
double r54814 = t;
double r54815 = 2e-16;
double r54816 = r54814 * r54815;
double r54817 = r54813 + r54816;
double r54818 = r54817 * r54817;
double r54819 = -1.0;
double r54820 = 2.0;
double r54821 = r54820 * r54816;
double r54822 = r54819 - r54821;
double r54823 = r54818 + r54822;
return r54823;
}
double f(double t) {
double r54824 = t;
double r54825 = 3.9999999999999997e-32;
double r54826 = r54824 * r54825;
double r54827 = r54826 * r54824;
return r54827;
}




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 unpow20.3
Applied associate-*r*0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2020021
(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)))))