\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)t \cdot \left(t \cdot 3.9999999999999997 \cdot 10^{-32}\right)double f(double t) {
double r64324 = 1.0;
double r64325 = t;
double r64326 = 2e-16;
double r64327 = r64325 * r64326;
double r64328 = r64324 + r64327;
double r64329 = r64328 * r64328;
double r64330 = -1.0;
double r64331 = 2.0;
double r64332 = r64331 * r64327;
double r64333 = r64330 - r64332;
double r64334 = r64329 + r64333;
return r64334;
}
double f(double t) {
double r64335 = t;
double r64336 = 3.9999999999999997e-32;
double r64337 = r64335 * r64336;
double r64338 = r64335 * r64337;
return r64338;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.6 |
| Herbie | 0.3 |
Initial program 61.8
Taylor expanded around 0 0.4
rmApplied sqr-pow0.4
Applied associate-*r*0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019198
(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)))))