\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){\left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot \left(3.999999999999999676487027278085939408227 \cdot 10^{-32} \cdot {t}^{4}\right)\right)}^{\frac{1}{2}}double f(double t) {
double r85921 = 1.0;
double r85922 = t;
double r85923 = 2e-16;
double r85924 = r85922 * r85923;
double r85925 = r85921 + r85924;
double r85926 = r85925 * r85925;
double r85927 = -1.0;
double r85928 = 2.0;
double r85929 = r85928 * r85924;
double r85930 = r85927 - r85929;
double r85931 = r85926 + r85930;
return r85931;
}
double f(double t) {
double r85932 = 3.9999999999999997e-32;
double r85933 = t;
double r85934 = 4.0;
double r85935 = pow(r85933, r85934);
double r85936 = r85932 * r85935;
double r85937 = r85932 * r85936;
double r85938 = 0.5;
double r85939 = pow(r85937, r85938);
return r85939;
}




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 add-sqr-sqrt0.3
Applied unswap-sqr0.4
rmApplied pow1/20.4
Applied pow1/20.4
Applied pow-prod-down0.4
Applied pow1/20.4
Applied pow1/20.4
Applied pow-prod-down0.6
Applied pow-prod-down0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019318
(FPCore (t)
:name "fma_test1"
:precision binary64
:pre (<= 0.900000000000000022 t 1.1000000000000001)
: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)))))