\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(\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \left|t\right|\right) \cdot \sqrt{{t}^{2}}\right)double f(double t) {
double r55260 = 1.0;
double r55261 = t;
double r55262 = 2e-16;
double r55263 = r55261 * r55262;
double r55264 = r55260 + r55263;
double r55265 = r55264 * r55264;
double r55266 = -1.0;
double r55267 = 2.0;
double r55268 = r55267 * r55263;
double r55269 = r55266 - r55268;
double r55270 = r55265 + r55269;
return r55270;
}
double f(double t) {
double r55271 = 3.9999999999999997e-32;
double r55272 = sqrt(r55271);
double r55273 = t;
double r55274 = fabs(r55273);
double r55275 = r55272 * r55274;
double r55276 = 2.0;
double r55277 = pow(r55273, r55276);
double r55278 = sqrt(r55277);
double r55279 = r55275 * r55278;
double r55280 = r55272 * r55279;
return r55280;
}




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