\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \le -7.840712946502026926766947963049170150444 \cdot 10^{-238} \lor \neg \left(\frac{x}{y} \le -0.0\right) \land \frac{x}{y} \le 9.273878276426671796812652531873498118302 \cdot 10^{124}:\\
\;\;\;\;\frac{x}{y} \cdot \left(z - t\right) + t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z - t}{y} + t\\
\end{array}double f(double x, double y, double z, double t) {
double r323386 = x;
double r323387 = y;
double r323388 = r323386 / r323387;
double r323389 = z;
double r323390 = t;
double r323391 = r323389 - r323390;
double r323392 = r323388 * r323391;
double r323393 = r323392 + r323390;
return r323393;
}
double f(double x, double y, double z, double t) {
double r323394 = x;
double r323395 = y;
double r323396 = r323394 / r323395;
double r323397 = -7.840712946502027e-238;
bool r323398 = r323396 <= r323397;
double r323399 = -0.0;
bool r323400 = r323396 <= r323399;
double r323401 = !r323400;
double r323402 = 9.273878276426672e+124;
bool r323403 = r323396 <= r323402;
bool r323404 = r323401 && r323403;
bool r323405 = r323398 || r323404;
double r323406 = z;
double r323407 = t;
double r323408 = r323406 - r323407;
double r323409 = r323396 * r323408;
double r323410 = r323409 + r323407;
double r323411 = r323408 / r323395;
double r323412 = r323394 * r323411;
double r323413 = r323412 + r323407;
double r323414 = r323405 ? r323410 : r323413;
return r323414;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 1.9 |
|---|---|
| Target | 2.0 |
| Herbie | 0.9 |
if (/ x y) < -7.840712946502027e-238 or -0.0 < (/ x y) < 9.273878276426672e+124Initial program 1.3
if -7.840712946502027e-238 < (/ x y) < -0.0 or 9.273878276426672e+124 < (/ x y) Initial program 4.3
rmApplied div-inv4.4
Applied associate-*l*1.3
Simplified1.3
Final simplification0.9
herbie shell --seed 2019306
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(if (< z 2.7594565545626922e-282) (+ (* (/ x y) (- z t)) t) (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) (+ (* (/ x y) (- z t)) t)))
(+ (* (/ x y) (- z t)) t))