\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 r3585293 = 1.0;
double r3585294 = t;
double r3585295 = 2e-16;
double r3585296 = r3585294 * r3585295;
double r3585297 = r3585293 + r3585296;
double r3585298 = r3585297 * r3585297;
double r3585299 = -1.0;
double r3585300 = 2.0;
double r3585301 = r3585300 * r3585296;
double r3585302 = r3585299 - r3585301;
double r3585303 = r3585298 + r3585302;
return r3585303;
}
double f(double t) {
double r3585304 = 3.9999999999999997e-32;
double r3585305 = t;
double r3585306 = r3585304 * r3585305;
double r3585307 = r3585306 * r3585305;
return r3585307;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.5 |
| Herbie | 0.3 |
Initial program 61.8
Simplified50.5
Taylor expanded around 0 0.4
Simplified0.4
rmApplied associate-*r*0.3
Final simplification0.3
herbie shell --seed 2019192 +o rules:numerics
(FPCore (t)
:name "fma_test1"
:pre (<= 0.9 t 1.1)
:herbie-target
(fma (+ 1.0 (* t 2e-16)) (+ 1.0 (* t 2e-16)) (- -1.0 (* 2.0 (* t 2e-16))))
(+ (* (+ 1.0 (* t 2e-16)) (+ 1.0 (* t 2e-16))) (- -1.0 (* 2.0 (* t 2e-16)))))