\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 r41630 = 1.0;
double r41631 = t;
double r41632 = 2e-16;
double r41633 = r41631 * r41632;
double r41634 = r41630 + r41633;
double r41635 = r41634 * r41634;
double r41636 = -1.0;
double r41637 = 2.0;
double r41638 = r41637 * r41633;
double r41639 = r41636 - r41638;
double r41640 = r41635 + r41639;
return r41640;
}
double f(double t) {
double r41641 = 3.9999999999999997e-32;
double r41642 = t;
double r41643 = r41641 * r41642;
double r41644 = r41643 * r41642;
return r41644;
}




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
Final simplification0.3
herbie shell --seed 2019291
(FPCore (t)
:name "fma_test1"
:precision binary64
:pre (<= 0.900000000000000022 t 1.1000000000000001)
: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)))))