\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)t \cdot \left(t \cdot 3.999999999999999676487027278085939408227 \cdot 10^{-32}\right)double f(double t) {
double r6080581 = 1.0;
double r6080582 = t;
double r6080583 = 2e-16;
double r6080584 = r6080582 * r6080583;
double r6080585 = r6080581 + r6080584;
double r6080586 = r6080585 * r6080585;
double r6080587 = -1.0;
double r6080588 = 2.0;
double r6080589 = r6080588 * r6080584;
double r6080590 = r6080587 - r6080589;
double r6080591 = r6080586 + r6080590;
return r6080591;
}
double f(double t) {
double r6080592 = t;
double r6080593 = 3.9999999999999997e-32;
double r6080594 = r6080592 * r6080593;
double r6080595 = r6080592 * r6080594;
return r6080595;
}




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