\left(1 + t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right) \cdot \left(1 + t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right) + \left(-1 - 2 \cdot \left(t \cdot 1.999999999999999958195573448069207123682 \cdot 10^{-16}\right)\right)t \cdot \left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot t\right)double f(double t) {
double r44334 = 1.0;
double r44335 = t;
double r44336 = 2e-16;
double r44337 = r44335 * r44336;
double r44338 = r44334 + r44337;
double r44339 = r44338 * r44338;
double r44340 = -1.0;
double r44341 = 2.0;
double r44342 = r44341 * r44337;
double r44343 = r44340 - r44342;
double r44344 = r44339 + r44343;
return r44344;
}
double f(double t) {
double r44345 = t;
double r44346 = 3.9999999999999997e-32;
double r44347 = r44346 * r44345;
double r44348 = r44345 * r44347;
return r44348;
}




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 sqr-pow0.3
Applied associate-*r*0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019326
(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)))))