\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;\frac{x - y}{z - y} \le -5.297791397205154729856129555711534946183 \cdot 10^{-210} \lor \neg \left(\frac{x - y}{z - y} \le -0.0\right):\\
\;\;\;\;\frac{x - y}{z - y} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{\frac{z - y}{t}}\\
\end{array}double f(double x, double y, double z, double t) {
double r444684 = x;
double r444685 = y;
double r444686 = r444684 - r444685;
double r444687 = z;
double r444688 = r444687 - r444685;
double r444689 = r444686 / r444688;
double r444690 = t;
double r444691 = r444689 * r444690;
return r444691;
}
double f(double x, double y, double z, double t) {
double r444692 = x;
double r444693 = y;
double r444694 = r444692 - r444693;
double r444695 = z;
double r444696 = r444695 - r444693;
double r444697 = r444694 / r444696;
double r444698 = -5.297791397205155e-210;
bool r444699 = r444697 <= r444698;
double r444700 = -0.0;
bool r444701 = r444697 <= r444700;
double r444702 = !r444701;
bool r444703 = r444699 || r444702;
double r444704 = t;
double r444705 = r444697 * r444704;
double r444706 = r444696 / r444704;
double r444707 = r444694 / r444706;
double r444708 = r444703 ? r444705 : r444707;
return r444708;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.3 |
|---|---|
| Target | 2.3 |
| Herbie | 1.6 |
if (/ (- x y) (- z y)) < -5.297791397205155e-210 or -0.0 < (/ (- x y) (- z y)) Initial program 2.0
if -5.297791397205155e-210 < (/ (- x y) (- z y)) < -0.0Initial program 7.7
rmApplied div-inv7.8
Applied associate-*l*0.9
Simplified0.8
rmApplied clear-num0.9
rmApplied un-div-inv0.8
Final simplification1.6
herbie shell --seed 2019326
(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))