\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)\left(\left(t \cdot 2 \cdot 10^{-16}\right) \cdot 2 \cdot 10^{-16}\right) \cdot tdouble f(double t) {
double r5653092 = 1.0;
double r5653093 = t;
double r5653094 = 2e-16;
double r5653095 = r5653093 * r5653094;
double r5653096 = r5653092 + r5653095;
double r5653097 = r5653096 * r5653096;
double r5653098 = -1.0;
double r5653099 = 2.0;
double r5653100 = r5653099 * r5653095;
double r5653101 = r5653098 - r5653100;
double r5653102 = r5653097 + r5653101;
return r5653102;
}
double f(double t) {
double r5653103 = t;
double r5653104 = 2e-16;
double r5653105 = r5653103 * r5653104;
double r5653106 = r5653105 * r5653104;
double r5653107 = r5653106 * r5653103;
return r5653107;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.6 |
| Herbie | 0.3 |
Initial program 61.8
Simplified0.4
rmApplied *-commutative0.4
Applied associate-*r*0.3
Final simplification0.3
herbie shell --seed 2019158
(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)))))