\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;\frac{x - y}{z - y} \le -1.1022940386055277 \cdot 10^{-35}:\\
\;\;\;\;\frac{x - y}{z - y} \cdot t\\
\mathbf{elif}\;\frac{x - y}{z - y} \le 0.0:\\
\;\;\;\;1 \cdot \left(\left(\left(x - y\right) \cdot t\right) \cdot \frac{1}{z - y}\right)\\
\mathbf{elif}\;\frac{x - y}{z - y} \le 5.14189203863818796 \cdot 10^{189}:\\
\;\;\;\;\frac{x - y}{z - y} \cdot t\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \left(\left(x - y\right) \cdot \frac{t}{z - y}\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r562864 = x;
double r562865 = y;
double r562866 = r562864 - r562865;
double r562867 = z;
double r562868 = r562867 - r562865;
double r562869 = r562866 / r562868;
double r562870 = t;
double r562871 = r562869 * r562870;
return r562871;
}
double f(double x, double y, double z, double t) {
double r562872 = x;
double r562873 = y;
double r562874 = r562872 - r562873;
double r562875 = z;
double r562876 = r562875 - r562873;
double r562877 = r562874 / r562876;
double r562878 = -1.1022940386055277e-35;
bool r562879 = r562877 <= r562878;
double r562880 = t;
double r562881 = r562877 * r562880;
double r562882 = 0.0;
bool r562883 = r562877 <= r562882;
double r562884 = 1.0;
double r562885 = r562874 * r562880;
double r562886 = r562884 / r562876;
double r562887 = r562885 * r562886;
double r562888 = r562884 * r562887;
double r562889 = 5.141892038638188e+189;
bool r562890 = r562877 <= r562889;
double r562891 = r562880 / r562876;
double r562892 = r562874 * r562891;
double r562893 = r562884 * r562892;
double r562894 = r562890 ? r562881 : r562893;
double r562895 = r562883 ? r562888 : r562894;
double r562896 = r562879 ? r562881 : r562895;
return r562896;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.1 |
|---|---|
| Target | 2.1 |
| Herbie | 1.6 |
if (/ (- x y) (- z y)) < -1.1022940386055277e-35 or 0.0 < (/ (- x y) (- z y)) < 5.141892038638188e+189Initial program 0.8
if -1.1022940386055277e-35 < (/ (- x y) (- z y)) < 0.0Initial program 5.6
rmApplied *-un-lft-identity5.6
Applied add-cube-cbrt6.2
Applied times-frac6.2
Applied associate-*l*4.6
rmApplied *-un-lft-identity4.6
Applied associate-*l*4.6
Simplified4.8
rmApplied div-inv4.9
Applied associate-*r*5.3
if 5.141892038638188e+189 < (/ (- x y) (- z y)) Initial program 14.6
rmApplied *-un-lft-identity14.6
Applied add-cube-cbrt15.3
Applied times-frac15.3
Applied associate-*l*3.0
rmApplied *-un-lft-identity3.0
Applied associate-*l*3.0
Simplified1.8
Final simplification1.6
herbie shell --seed 2020081 +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))