\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;\frac{x - y}{z - y} \le -2.544214561517923758805195215495225749795 \cdot 10^{302}:\\
\;\;\;\;\frac{x - y}{\frac{z - y}{t}}\\
\mathbf{elif}\;\frac{x - y}{z - y} \le -2.255883818241031694480871714775758718908 \cdot 10^{-274} \lor \neg \left(\frac{x - y}{z - y} \le 1.942335659593579709608284822301914437699 \cdot 10^{-153}\right) \land \frac{x - y}{z - y} \le 5.779702072575541191674228138407204633316 \cdot 10^{148}:\\
\;\;\;\;t \cdot \frac{x - y}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\end{array}double f(double x, double y, double z, double t) {
double r363946 = x;
double r363947 = y;
double r363948 = r363946 - r363947;
double r363949 = z;
double r363950 = r363949 - r363947;
double r363951 = r363948 / r363950;
double r363952 = t;
double r363953 = r363951 * r363952;
return r363953;
}
double f(double x, double y, double z, double t) {
double r363954 = x;
double r363955 = y;
double r363956 = r363954 - r363955;
double r363957 = z;
double r363958 = r363957 - r363955;
double r363959 = r363956 / r363958;
double r363960 = -2.5442145615179238e+302;
bool r363961 = r363959 <= r363960;
double r363962 = t;
double r363963 = r363958 / r363962;
double r363964 = r363956 / r363963;
double r363965 = -2.2558838182410317e-274;
bool r363966 = r363959 <= r363965;
double r363967 = 1.9423356595935797e-153;
bool r363968 = r363959 <= r363967;
double r363969 = !r363968;
double r363970 = 5.779702072575541e+148;
bool r363971 = r363959 <= r363970;
bool r363972 = r363969 && r363971;
bool r363973 = r363966 || r363972;
double r363974 = r363962 * r363959;
double r363975 = r363962 / r363958;
double r363976 = r363956 * r363975;
double r363977 = r363973 ? r363974 : r363976;
double r363978 = r363961 ? r363964 : r363977;
return r363978;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.3 |
|---|---|
| Target | 2.3 |
| Herbie | 0.4 |
if (/ (- x y) (- z y)) < -2.5442145615179238e+302Initial program 57.6
rmApplied *-un-lft-identity57.6
Applied associate-*l*57.6
Simplified0.4
rmApplied associate-/l*0.3
if -2.5442145615179238e+302 < (/ (- x y) (- z y)) < -2.2558838182410317e-274 or 1.9423356595935797e-153 < (/ (- x y) (- z y)) < 5.779702072575541e+148Initial program 0.2
if -2.2558838182410317e-274 < (/ (- x y) (- z y)) < 1.9423356595935797e-153 or 5.779702072575541e+148 < (/ (- x y) (- z y)) Initial program 10.2
rmApplied *-un-lft-identity10.2
Applied associate-*l*10.2
Simplified1.8
rmApplied *-un-lft-identity1.8
Applied times-frac1.5
Simplified1.5
Final simplification0.4
herbie shell --seed 2019194 +o rules:numerics
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))