\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)\sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}} \cdot \left(t \cdot \left(t \cdot \sqrt{3.999999999999999676487027278085939408227 \cdot 10^{-32}}\right)\right)double f(double t) {
double r3596723 = 1.0;
double r3596724 = t;
double r3596725 = 2e-16;
double r3596726 = r3596724 * r3596725;
double r3596727 = r3596723 + r3596726;
double r3596728 = r3596727 * r3596727;
double r3596729 = -1.0;
double r3596730 = 2.0;
double r3596731 = r3596730 * r3596726;
double r3596732 = r3596729 - r3596731;
double r3596733 = r3596728 + r3596732;
return r3596733;
}
double f(double t) {
double r3596734 = 3.9999999999999997e-32;
double r3596735 = sqrt(r3596734);
double r3596736 = t;
double r3596737 = r3596736 * r3596735;
double r3596738 = r3596736 * r3596737;
double r3596739 = r3596735 * r3596738;
return r3596739;
}




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
rmApplied add-sqr-sqrt0.3
Applied associate-*l*0.4
Taylor expanded around 0 0.4
Simplified0.3
Final simplification0.3
herbie shell --seed 2019179 +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)))))