\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)3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot \left(t \cdot t\right)double f(double t) {
double r35658 = 1.0;
double r35659 = t;
double r35660 = 2e-16;
double r35661 = r35659 * r35660;
double r35662 = r35658 + r35661;
double r35663 = r35662 * r35662;
double r35664 = -1.0;
double r35665 = 2.0;
double r35666 = r35665 * r35661;
double r35667 = r35664 - r35666;
double r35668 = r35663 + r35667;
return r35668;
}
double f(double t) {
double r35669 = 3.9999999999999997e-32;
double r35670 = t;
double r35671 = r35670 * r35670;
double r35672 = r35669 * r35671;
return r35672;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.6 |
| Herbie | 0.3 |
Initial program 61.8
Simplified50.6
Taylor expanded around 0 0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019194 +o rules:numerics
(FPCore (t)
:name "fma_test1"
:pre (<= 0.9 t 1.1)
:herbie-target
(fma (+ 1.0 (* t 2e-16)) (+ 1.0 (* t 2e-16)) (- -1.0 (* 2.0 (* t 2e-16))))
(+ (* (+ 1.0 (* t 2e-16)) (+ 1.0 (* t 2e-16))) (- -1.0 (* 2.0 (* t 2e-16)))))