\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;\frac{x - y}{z - y} \le 3.97599780479126807 \cdot 10^{218}:\\
\;\;\;\;\frac{x - y}{z - y} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x - y\right) \cdot t\right) \cdot \frac{1}{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 ((((double) (((double) (x - y)) / ((double) (z - y)))) <= 3.975997804791268e+218)) {
VAR = ((double) (((double) (((double) (x - y)) / ((double) (z - y)))) * t));
} else {
VAR = ((double) (((double) (((double) (x - y)) * t)) * ((double) (1.0 / ((double) (z - y))))));
}
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.5 |
if (/ (- x y) (- z y)) < 3.97599780479126807e218Initial program 1.6
if 3.97599780479126807e218 < (/ (- x y) (- z y)) Initial program 26.4
rmApplied div-inv26.4
Applied associate-*l*0.9
Simplified0.8
rmApplied div-inv0.9
Applied associate-*r*0.4
Final simplification1.5
herbie shell --seed 2020161
(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))