\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;y \le -5.1084132183414814 \cdot 10^{-215} \lor \neg \left(y \le 3.731124293974029 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{t}{\frac{z - y}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z - y}\\
\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 (((y <= -5.108413218341481e-215) || !(y <= 3.731124293974029e-13))) {
VAR = ((double) (t / ((double) (((double) (z - y)) / ((double) (x - y))))));
} else {
VAR = ((double) (((double) (((double) (x - y)) * t)) / ((double) (z - y))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.3 |
|---|---|
| Target | 2.4 |
| Herbie | 2.4 |
if y < -5.108413218341481e-215 or 3.731124293974029e-13 < y Initial program 1.0
rmApplied clear-num1.1
rmApplied associate-*l/1.0
Simplified1.0
if -5.108413218341481e-215 < y < 3.731124293974029e-13Initial program 5.5
rmApplied associate-*l/5.7
Final simplification2.4
herbie shell --seed 2020120
(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))