\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;\frac{x - y}{z - y} \le -1.7918506214892867 \cdot 10^{299} \lor \neg \left(\frac{x - y}{z - y} \le -1.1471559015900161 \cdot 10^{-143} \lor \neg \left(\frac{x - y}{z - y} \le 1.54577676 \cdot 10^{-317}\right)\right):\\
\;\;\;\;\frac{t \cdot \left(x - y\right)}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{z - y} \cdot t\\
\end{array}double f(double x, double y, double z, double t) {
double r494510 = x;
double r494511 = y;
double r494512 = r494510 - r494511;
double r494513 = z;
double r494514 = r494513 - r494511;
double r494515 = r494512 / r494514;
double r494516 = t;
double r494517 = r494515 * r494516;
return r494517;
}
double f(double x, double y, double z, double t) {
double r494518 = x;
double r494519 = y;
double r494520 = r494518 - r494519;
double r494521 = z;
double r494522 = r494521 - r494519;
double r494523 = r494520 / r494522;
double r494524 = -1.7918506214892867e+299;
bool r494525 = r494523 <= r494524;
double r494526 = -1.147155901590016e-143;
bool r494527 = r494523 <= r494526;
double r494528 = 1.5457767632901e-317;
bool r494529 = r494523 <= r494528;
double r494530 = !r494529;
bool r494531 = r494527 || r494530;
double r494532 = !r494531;
bool r494533 = r494525 || r494532;
double r494534 = t;
double r494535 = r494534 * r494520;
double r494536 = r494535 / r494522;
double r494537 = r494523 * r494534;
double r494538 = r494533 ? r494536 : r494537;
return r494538;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.1 |
|---|---|
| Target | 2.1 |
| Herbie | 0.9 |
if (/ (- x y) (- z y)) < -1.7918506214892867e+299 or -1.147155901590016e-143 < (/ (- x y) (- z y)) < 1.5457767632901e-317Initial program 12.6
rmApplied div-inv12.6
rmApplied un-div-inv12.6
Applied associate-*l/1.7
Simplified1.7
if -1.7918506214892867e+299 < (/ (- x y) (- z y)) < -1.147155901590016e-143 or 1.5457767632901e-317 < (/ (- x y) (- z y)) Initial program 0.8
Final simplification0.9
herbie shell --seed 2020064
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))