\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 r1332545 = 1.0;
double r1332546 = t;
double r1332547 = 2e-16;
double r1332548 = r1332546 * r1332547;
double r1332549 = r1332545 + r1332548;
double r1332550 = r1332549 * r1332549;
double r1332551 = -1.0;
double r1332552 = 2.0;
double r1332553 = r1332552 * r1332548;
double r1332554 = r1332551 - r1332553;
double r1332555 = r1332550 + r1332554;
return r1332555;
}
double f(double t) {
double r1332556 = 2e-16;
double r1332557 = t;
double r1332558 = r1332556 * r1332557;
double r1332559 = r1332558 * r1332557;
double r1332560 = r1332559 * r1332556;
return r1332560;
}




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