\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)\sqrt{3.9999999999999997 \cdot 10^{-32}} \cdot \left(\sqrt{3.9999999999999997 \cdot 10^{-32}} \cdot {t}^{2}\right)double f(double t) {
double r58435 = 1.0;
double r58436 = t;
double r58437 = 2e-16;
double r58438 = r58436 * r58437;
double r58439 = r58435 + r58438;
double r58440 = r58439 * r58439;
double r58441 = -1.0;
double r58442 = 2.0;
double r58443 = r58442 * r58438;
double r58444 = r58441 - r58443;
double r58445 = r58440 + r58444;
return r58445;
}
double f(double t) {
double r58446 = 3.9999999999999997e-32;
double r58447 = sqrt(r58446);
double r58448 = t;
double r58449 = 2.0;
double r58450 = pow(r58448, r58449);
double r58451 = r58447 * r58450;
double r58452 = r58447 * r58451;
return r58452;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.6 |
| Herbie | 0.3 |
Initial program 61.8
Taylor expanded around 0 0.3
rmApplied add-sqr-sqrt0.3
Applied associate-*l*0.3
Final simplification0.3
herbie shell --seed 2020056
(FPCore (t)
:name "fma_test1"
:precision binary64
: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)))))