\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 r47282 = 1.0;
double r47283 = t;
double r47284 = 2e-16;
double r47285 = r47283 * r47284;
double r47286 = r47282 + r47285;
double r47287 = r47286 * r47286;
double r47288 = -1.0;
double r47289 = 2.0;
double r47290 = r47289 * r47285;
double r47291 = r47288 - r47290;
double r47292 = r47287 + r47291;
return r47292;
}
double f(double t) {
double r47293 = t;
double r47294 = 3.9999999999999997e-32;
double r47295 = r47293 * r47294;
double r47296 = r47293 * r47295;
return r47296;
}




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