\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 r305885 = x;
double r305886 = y;
double r305887 = r305885 - r305886;
double r305888 = z;
double r305889 = r305888 - r305886;
double r305890 = r305887 / r305889;
double r305891 = t;
double r305892 = r305890 * r305891;
return r305892;
}
double f(double x, double y, double z, double t) {
double r305893 = x;
double r305894 = y;
double r305895 = r305893 - r305894;
double r305896 = z;
double r305897 = r305896 - r305894;
double r305898 = r305895 / r305897;
double r305899 = -5.297791397205155e-210;
bool r305900 = r305898 <= r305899;
double r305901 = -0.0;
bool r305902 = r305898 <= r305901;
double r305903 = !r305902;
bool r305904 = r305900 || r305903;
double r305905 = t;
double r305906 = r305898 * r305905;
double r305907 = r305897 / r305905;
double r305908 = r305895 / r305907;
double r305909 = r305904 ? r305906 : r305908;
return r305909;
}




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 pow10.9
Applied pow10.9
Applied pow-prod-down0.9
Simplified0.8
Final simplification1.6
herbie shell --seed 2019326 +o rules:numerics
(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))