\left(1 + t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right) \cdot \left(1 + t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right) + \left(-1 - 2 \cdot \left(t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right)\right)\left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot t\right) \cdot tdouble f(double t) {
double r4306514 = 1.0;
double r4306515 = t;
double r4306516 = 2e-16;
double r4306517 = r4306515 * r4306516;
double r4306518 = r4306514 + r4306517;
double r4306519 = r4306518 * r4306518;
double r4306520 = -1.0;
double r4306521 = 2.0;
double r4306522 = r4306521 * r4306517;
double r4306523 = r4306520 - r4306522;
double r4306524 = r4306519 + r4306523;
return r4306524;
}
double f(double t) {
double r4306525 = 3.9999999999999997e-32;
double r4306526 = t;
double r4306527 = r4306525 * r4306526;
double r4306528 = r4306527 * r4306526;
return r4306528;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.5 |
| Herbie | 0.3 |
Initial program 61.8
Taylor expanded around 0 0.4
Simplified0.4
Taylor expanded around 0 0.4
Simplified0.3
Final simplification0.3
herbie shell --seed 2019192
(FPCore (t)
:name "fma_test1"
:pre (<= 0.9 t 1.1)
:herbie-target
(fma (+ 1.0 (* t 2e-16)) (+ 1.0 (* t 2e-16)) (- -1.0 (* 2.0 (* t 2e-16))))
(+ (* (+ 1.0 (* t 2e-16)) (+ 1.0 (* t 2e-16))) (- -1.0 (* 2.0 (* t 2e-16)))))