\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)\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \left(\left(t \cdot \sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}\right) \cdot {t}^{\left(\frac{2}{2}\right)}\right)double f(double t) {
double r224661 = 1.0;
double r224662 = t;
double r224663 = 2e-16;
double r224664 = r224662 * r224663;
double r224665 = r224661 + r224664;
double r224666 = r224665 * r224665;
double r224667 = -1.0;
double r224668 = 2.0;
double r224669 = r224668 * r224664;
double r224670 = r224667 - r224669;
double r224671 = r224666 + r224670;
return r224671;
}
double f(double t) {
double r224672 = 3.9999999999999997e-32;
double r224673 = sqrt(r224672);
double r224674 = t;
double r224675 = r224674 * r224673;
double r224676 = 2.0;
double r224677 = r224676 / r224676;
double r224678 = pow(r224674, r224677);
double r224679 = r224675 * r224678;
double r224680 = r224673 * r224679;
return r224680;
}




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 add-sqr-sqrt0.3
Applied associate-*l*0.4
rmApplied sqr-pow0.4
Applied associate-*r*0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019350
(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)))))