double f(double t) {
double r7828092 = 1.0;
double r7828093 = t;
double r7828094 = 2e-16;
double r7828095 = r7828093 * r7828094;
double r7828096 = r7828092 + r7828095;
double r7828097 = r7828096 * r7828096;
double r7828098 = -1.0;
double r7828099 = 2.0;
double r7828100 = r7828099 * r7828095;
double r7828101 = r7828098 - r7828100;
double r7828102 = r7828097 + r7828101;
return r7828102;
}
double f(double t) {
double r7828103 = 3.9999999999999997e-32;
double r7828104 = t;
double r7828105 = r7828104 * r7828104;
double r7828106 = r7828103 * r7828105;
return r7828106;
}
\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)3.9999999999999997 \cdot 10^{-32} \cdot \left(t \cdot t\right)



Bits error versus t
| Original | 61.8 |
|---|---|
| Target | 50.6 |
| Herbie | 0.3 |
Initial program 61.8
Simplified50.3
Taylor expanded around inf 0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019102 +o rules:numerics
(FPCore (t)
:name "fma_test1"
: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)))))