\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;\frac{x - y}{z - y} \cdot t = -inf.0 \lor \neg \left(\frac{x - y}{z - y} \cdot t \le -2.2967359754016671 \cdot 10^{-274} \lor \neg \left(\frac{x - y}{z - y} \cdot t \le 9.2907999515337591 \cdot 10^{-276}\right)\right):\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{z - y} \cdot t\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (((double) (((double) (x - y)) / ((double) (z - y)))) * t));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((((double) (((double) (((double) (x - y)) / ((double) (z - y)))) * t)) <= -inf.0) || !((((double) (((double) (((double) (x - y)) / ((double) (z - y)))) * t)) <= -2.296735975401667e-274) || !(((double) (((double) (((double) (x - y)) / ((double) (z - y)))) * t)) <= 9.290799951533759e-276)))) {
VAR = ((double) (((double) (((double) (x - y)) * t)) / ((double) (z - y))));
} else {
VAR = ((double) (((double) (((double) (x - y)) / ((double) (z - y)))) * t));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.4 |
|---|---|
| Target | 2.4 |
| Herbie | 1.1 |
if (* (/ (- x y) (- z y)) t) < -inf.0 or -2.296735975401667e-274 < (* (/ (- x y) (- z y)) t) < 9.290799951533759e-276Initial program 9.8
rmApplied associate-*l/1.6
if -inf.0 < (* (/ (- x y) (- z y)) t) < -2.296735975401667e-274 or 9.290799951533759e-276 < (* (/ (- x y) (- z y)) t) Initial program 1.0
Final simplification1.1
herbie shell --seed 2020148
(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))