\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 r239929 = x;
double r239930 = y;
double r239931 = r239929 - r239930;
double r239932 = z;
double r239933 = r239932 - r239930;
double r239934 = r239931 / r239933;
double r239935 = t;
double r239936 = r239934 * r239935;
return r239936;
}
double f(double x, double y, double z, double t) {
double r239937 = x;
double r239938 = y;
double r239939 = r239937 - r239938;
double r239940 = z;
double r239941 = r239940 - r239938;
double r239942 = r239939 / r239941;
double r239943 = -5.297791397205155e-210;
bool r239944 = r239942 <= r239943;
double r239945 = -0.0;
bool r239946 = r239942 <= r239945;
double r239947 = !r239946;
bool r239948 = r239944 || r239947;
double r239949 = t;
double r239950 = r239942 * r239949;
double r239951 = r239941 / r239949;
double r239952 = r239939 / r239951;
double r239953 = r239948 ? r239950 : r239952;
return r239953;
}




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 1.6
if -5.297791397205155e-210 < (/ (- x y) (- z y)) < -0.0Initial program 11.4
rmApplied div-inv11.4
Applied associate-*l*0.7
Simplified0.7
rmApplied clear-num0.7
rmApplied pow10.7
Applied pow10.7
Applied pow-prod-down0.7
Simplified0.6
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))