\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 r4862060 = 1.0;
double r4862061 = t;
double r4862062 = 2e-16;
double r4862063 = r4862061 * r4862062;
double r4862064 = r4862060 + r4862063;
double r4862065 = r4862064 * r4862064;
double r4862066 = -1.0;
double r4862067 = 2.0;
double r4862068 = r4862067 * r4862063;
double r4862069 = r4862066 - r4862068;
double r4862070 = r4862065 + r4862069;
return r4862070;
}
double f(double t) {
double r4862071 = 3.9999999999999997e-32;
double r4862072 = t;
double r4862073 = r4862072 * r4862072;
double r4862074 = r4862071 * r4862073;
return r4862074;
}




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