\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 \left|t\right|\right) \cdot \sqrt{{t}^{2}}double f(double t) {
double r50265 = 1.0;
double r50266 = t;
double r50267 = 2e-16;
double r50268 = r50266 * r50267;
double r50269 = r50265 + r50268;
double r50270 = r50269 * r50269;
double r50271 = -1.0;
double r50272 = 2.0;
double r50273 = r50272 * r50268;
double r50274 = r50271 - r50273;
double r50275 = r50270 + r50274;
return r50275;
}
double f(double t) {
double r50276 = 3.9999999999999997e-32;
double r50277 = t;
double r50278 = fabs(r50277);
double r50279 = r50276 * r50278;
double r50280 = 2.0;
double r50281 = pow(r50277, r50280);
double r50282 = sqrt(r50281);
double r50283 = r50279 * r50282;
return r50283;
}




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-*r*0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019323
(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)))))