\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;\frac{x - y}{z - y} = -\infty:\\
\;\;\;\;\frac{1}{z - y} \cdot \left(\left(x - y\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x}{z - y} - \frac{y}{z - y}\right) \cdot t\\
\end{array}double f(double x, double y, double z, double t) {
double r22771609 = x;
double r22771610 = y;
double r22771611 = r22771609 - r22771610;
double r22771612 = z;
double r22771613 = r22771612 - r22771610;
double r22771614 = r22771611 / r22771613;
double r22771615 = t;
double r22771616 = r22771614 * r22771615;
return r22771616;
}
double f(double x, double y, double z, double t) {
double r22771617 = x;
double r22771618 = y;
double r22771619 = r22771617 - r22771618;
double r22771620 = z;
double r22771621 = r22771620 - r22771618;
double r22771622 = r22771619 / r22771621;
double r22771623 = -inf.0;
bool r22771624 = r22771622 <= r22771623;
double r22771625 = 1.0;
double r22771626 = r22771625 / r22771621;
double r22771627 = t;
double r22771628 = r22771619 * r22771627;
double r22771629 = r22771626 * r22771628;
double r22771630 = r22771617 / r22771621;
double r22771631 = r22771618 / r22771621;
double r22771632 = r22771630 - r22771631;
double r22771633 = r22771632 * r22771627;
double r22771634 = r22771624 ? r22771629 : r22771633;
return r22771634;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.2 |
|---|---|
| Target | 2.1 |
| Herbie | 1.6 |
if (/ (- x y) (- z y)) < -inf.0Initial program 64.0
rmApplied div-inv64.0
Applied associate-*l*0.3
Simplified0.3
rmApplied div-inv0.3
Applied associate-*r*0.4
if -inf.0 < (/ (- x y) (- z y)) Initial program 1.6
rmApplied div-sub1.6
Final simplification1.6
herbie shell --seed 2019200 +o rules:numerics
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))