x + \frac{\left(y - x\right) \cdot z}{t}\begin{array}{l}
\mathbf{if}\;x \le -8.569505825407989543812372125064038589152 \cdot 10^{-260}:\\
\;\;\;\;x - \frac{1}{\frac{1}{\frac{x - y}{\frac{t}{z}}}}\\
\mathbf{elif}\;x \le 5.917060633856001102745021389922587405998 \cdot 10^{-143}:\\
\;\;\;\;x - \frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x - \left(x - y\right) \cdot \frac{z}{t}\\
\end{array}double f(double x, double y, double z, double t) {
double r321243 = x;
double r321244 = y;
double r321245 = r321244 - r321243;
double r321246 = z;
double r321247 = r321245 * r321246;
double r321248 = t;
double r321249 = r321247 / r321248;
double r321250 = r321243 + r321249;
return r321250;
}
double f(double x, double y, double z, double t) {
double r321251 = x;
double r321252 = -8.56950582540799e-260;
bool r321253 = r321251 <= r321252;
double r321254 = 1.0;
double r321255 = y;
double r321256 = r321251 - r321255;
double r321257 = t;
double r321258 = z;
double r321259 = r321257 / r321258;
double r321260 = r321256 / r321259;
double r321261 = r321254 / r321260;
double r321262 = r321254 / r321261;
double r321263 = r321251 - r321262;
double r321264 = 5.917060633856001e-143;
bool r321265 = r321251 <= r321264;
double r321266 = r321258 * r321256;
double r321267 = r321266 / r321257;
double r321268 = r321251 - r321267;
double r321269 = r321258 / r321257;
double r321270 = r321256 * r321269;
double r321271 = r321251 - r321270;
double r321272 = r321265 ? r321268 : r321271;
double r321273 = r321253 ? r321263 : r321272;
return r321273;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.8 |
|---|---|
| Target | 2.0 |
| Herbie | 2.1 |
if x < -8.56950582540799e-260Initial program 7.0
Simplified1.8
rmApplied *-un-lft-identity1.8
Applied associate-*l*1.8
Simplified1.7
rmApplied div-inv1.7
Applied associate-/r*7.3
rmApplied clear-num7.3
Simplified1.7
if -8.56950582540799e-260 < x < 5.917060633856001e-143Initial program 5.6
Simplified4.9
rmApplied *-un-lft-identity4.9
Applied associate-*l*4.9
Simplified5.0
Taylor expanded around 0 5.6
Simplified5.6
if 5.917060633856001e-143 < x Initial program 7.1
Simplified0.7
Final simplification2.1
herbie shell --seed 2019196
(FPCore (x y z t)
:name "Numeric.Histogram:binBounds from Chart-1.5.3"
:herbie-target
(if (< x -9.025511195533005e-135) (- x (* (/ z t) (- x y))) (if (< x 4.275032163700715e-250) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z)))))
(+ x (/ (* (- y x) z) t)))