\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 r1437427 = 1.0;
double r1437428 = t;
double r1437429 = 2e-16;
double r1437430 = r1437428 * r1437429;
double r1437431 = r1437427 + r1437430;
double r1437432 = r1437431 * r1437431;
double r1437433 = -1.0;
double r1437434 = 2.0;
double r1437435 = r1437434 * r1437430;
double r1437436 = r1437433 - r1437435;
double r1437437 = r1437432 + r1437436;
return r1437437;
}
double f(double t) {
double r1437438 = 2e-16;
double r1437439 = t;
double r1437440 = r1437438 * r1437439;
double r1437441 = r1437438 * r1437440;
double r1437442 = r1437441 * r1437439;
return r1437442;
}




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