\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(2 \cdot 10^{-16} \cdot \left(2 \cdot 10^{-16} \cdot t\right)\right) \cdot tdouble f(double t) {
double r3890496 = 1.0;
double r3890497 = t;
double r3890498 = 2e-16;
double r3890499 = r3890497 * r3890498;
double r3890500 = r3890496 + r3890499;
double r3890501 = r3890500 * r3890500;
double r3890502 = -1.0;
double r3890503 = 2.0;
double r3890504 = r3890503 * r3890499;
double r3890505 = r3890502 - r3890504;
double r3890506 = r3890501 + r3890505;
return r3890506;
}
double f(double t) {
double r3890507 = 2e-16;
double r3890508 = t;
double r3890509 = r3890507 * r3890508;
double r3890510 = r3890507 * r3890509;
double r3890511 = r3890510 * r3890508;
return r3890511;
}




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