\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(2 \cdot 10^{-16} \cdot t\right) \cdot t\right) \cdot 2 \cdot 10^{-16}double f(double t) {
double r1457640 = 1.0;
double r1457641 = t;
double r1457642 = 2e-16;
double r1457643 = r1457641 * r1457642;
double r1457644 = r1457640 + r1457643;
double r1457645 = r1457644 * r1457644;
double r1457646 = -1.0;
double r1457647 = 2.0;
double r1457648 = r1457647 * r1457643;
double r1457649 = r1457646 - r1457648;
double r1457650 = r1457645 + r1457649;
return r1457650;
}
double f(double t) {
double r1457651 = 2e-16;
double r1457652 = t;
double r1457653 = r1457651 * r1457652;
double r1457654 = r1457653 * r1457652;
double r1457655 = r1457654 * r1457651;
return r1457655;
}




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