\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 r1264996 = 1.0;
double r1264997 = t;
double r1264998 = 2e-16;
double r1264999 = r1264997 * r1264998;
double r1265000 = r1264996 + r1264999;
double r1265001 = r1265000 * r1265000;
double r1265002 = -1.0;
double r1265003 = 2.0;
double r1265004 = r1265003 * r1264999;
double r1265005 = r1265002 - r1265004;
double r1265006 = r1265001 + r1265005;
return r1265006;
}
double f(double t) {
double r1265007 = 3.9999999999999997e-32;
double r1265008 = t;
double r1265009 = r1265008 * r1265008;
double r1265010 = r1265007 * r1265009;
return r1265010;
}




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 +o rules:numerics
(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)))))