\left(1 + t \cdot 2 \cdot 10^{-16}\right) \cdot \left(1 + t \cdot 2 \cdot 10^{-16}\right) + \left(-1 - 2 \cdot \left(t \cdot 2 \cdot 10^{-16}\right)\right)3.9999999999999997 \cdot 10^{-32} \cdot \left(t \cdot t\right)double f(double t) {
double r1228668 = 1.0;
double r1228669 = t;
double r1228670 = 2e-16;
double r1228671 = r1228669 * r1228670;
double r1228672 = r1228668 + r1228671;
double r1228673 = r1228672 * r1228672;
double r1228674 = -1.0;
double r1228675 = 2.0;
double r1228676 = r1228675 * r1228671;
double r1228677 = r1228674 - r1228676;
double r1228678 = r1228673 + r1228677;
return r1228678;
}
double f(double t) {
double r1228679 = 3.9999999999999997e-32;
double r1228680 = t;
double r1228681 = r1228680 * r1228680;
double r1228682 = r1228679 * r1228681;
return r1228682;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.6 |
| Herbie | 0.3 |
Initial program 61.8
Simplified61.8
Taylor expanded around 0 0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019154
(FPCore (t)
:name "fma_test1"
: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)))))