\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 {t}^{\left(\frac{2}{2}\right)}double f(double t) {
double r78408 = 1.0;
double r78409 = t;
double r78410 = 2e-16;
double r78411 = r78409 * r78410;
double r78412 = r78408 + r78411;
double r78413 = r78412 * r78412;
double r78414 = -1.0;
double r78415 = 2.0;
double r78416 = r78415 * r78411;
double r78417 = r78414 - r78416;
double r78418 = r78413 + r78417;
return r78418;
}
double f(double t) {
double r78419 = 3.9999999999999997e-32;
double r78420 = t;
double r78421 = r78419 * r78420;
double r78422 = 2.0;
double r78423 = r78422 / r78422;
double r78424 = pow(r78420, r78423);
double r78425 = r78421 * r78424;
return r78425;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.6 |
| Herbie | 0.3 |
Initial program 61.8
Taylor expanded around 0 0.4
rmApplied sqr-pow0.4
Applied associate-*r*0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019351
(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)))))