\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;\frac{x - y}{z - y} \le -1.87946597334454065 \cdot 10^{298}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x}{z - y} - \frac{y}{z - y}\right) \cdot t\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) ((((double) (x - y)) / ((double) (z - y))) * t));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((((double) (x - y)) / ((double) (z - y))) <= -1.8794659733445407e+298)) {
VAR = (((double) (((double) (x - y)) * t)) / ((double) (z - y)));
} else {
VAR = ((double) (((double) ((x / ((double) (z - y))) - (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.1 |
|---|---|
| Target | 2.1 |
| Herbie | 1.6 |
if (/ (- x y) (- z y)) < -1.87946597334454065e298Initial program 54.3
rmApplied associate-*l/0.2
if -1.87946597334454065e298 < (/ (- x y) (- z y)) Initial program 1.7
rmApplied div-sub1.6
Final simplification1.6
herbie shell --seed 2020182
(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))