\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)\left(2 \cdot 10^{-16} \cdot \left(2 \cdot 10^{-16} \cdot t\right)\right) \cdot tdouble f(double t) {
double r11161069 = 1.0;
double r11161070 = t;
double r11161071 = 2e-16;
double r11161072 = r11161070 * r11161071;
double r11161073 = r11161069 + r11161072;
double r11161074 = r11161073 * r11161073;
double r11161075 = -1.0;
double r11161076 = 2.0;
double r11161077 = r11161076 * r11161072;
double r11161078 = r11161075 - r11161077;
double r11161079 = r11161074 + r11161078;
return r11161079;
}
double f(double t) {
double r11161080 = 2e-16;
double r11161081 = t;
double r11161082 = r11161080 * r11161081;
double r11161083 = r11161080 * r11161082;
double r11161084 = r11161083 * r11161081;
return r11161084;
}




Bits error versus t
Results
| Original | 61.8 |
|---|---|
| Target | 50.6 |
| Herbie | 0.3 |
Initial program 61.8
Simplified0.4
rmApplied associate-*r*0.3
Final simplification0.3
herbie shell --seed 2019107
(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)))))