\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;\frac{x - y}{z - y} \cdot t = -\infty:\\
\;\;\;\;\left(x - y\right) \cdot \frac{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)) {
VAR = ((double) (((double) (x - y)) * ((double) (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.3 |
|---|---|
| Target | 2.4 |
| Herbie | 1.8 |
if (* (/ (- x y) (- z y)) t) < -inf.0Initial program 64.0
rmApplied div-inv64.0
Applied associate-*l*0.3
Simplified0.2
if -inf.0 < (* (/ (- x y) (- z y)) t) Initial program 1.8
Final simplification1.8
herbie shell --seed 2020120 +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))