\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)3.9999999999999997 \cdot 10^{-32} \cdot \left(t \cdot t\right)double f(double t) {
double r2648698 = 1.0;
double r2648699 = t;
double r2648700 = 2e-16;
double r2648701 = r2648699 * r2648700;
double r2648702 = r2648698 + r2648701;
double r2648703 = r2648702 * r2648702;
double r2648704 = -1.0;
double r2648705 = 2.0;
double r2648706 = r2648705 * r2648701;
double r2648707 = r2648704 - r2648706;
double r2648708 = r2648703 + r2648707;
return r2648708;
}
double f(double t) {
double r2648709 = 3.9999999999999997e-32;
double r2648710 = t;
double r2648711 = r2648710 * r2648710;
double r2648712 = r2648709 * r2648711;
return r2648712;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.6 |
| Herbie | 0.3 |
Initial program 61.8
Simplified0.4
Taylor expanded around 0 0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019163
(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)))))