\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \le -3.9791520014535619 \cdot 10^{-163} \lor \neg \left(\frac{x}{y} \le 8.23383008289744965 \cdot 10^{-230}\right) \land \frac{x}{y} \le 2.6979942480068814 \cdot 10^{197}:\\
\;\;\;\;\frac{x}{y} \cdot \left(z - t\right) + t\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x \cdot z}{y} - \frac{t \cdot x}{y}\right) + t\\
\end{array}double f(double x, double y, double z, double t) {
double r346613 = x;
double r346614 = y;
double r346615 = r346613 / r346614;
double r346616 = z;
double r346617 = t;
double r346618 = r346616 - r346617;
double r346619 = r346615 * r346618;
double r346620 = r346619 + r346617;
return r346620;
}
double f(double x, double y, double z, double t) {
double r346621 = x;
double r346622 = y;
double r346623 = r346621 / r346622;
double r346624 = -3.979152001453562e-163;
bool r346625 = r346623 <= r346624;
double r346626 = 8.23383008289745e-230;
bool r346627 = r346623 <= r346626;
double r346628 = !r346627;
double r346629 = 2.6979942480068814e+197;
bool r346630 = r346623 <= r346629;
bool r346631 = r346628 && r346630;
bool r346632 = r346625 || r346631;
double r346633 = z;
double r346634 = t;
double r346635 = r346633 - r346634;
double r346636 = r346623 * r346635;
double r346637 = r346636 + r346634;
double r346638 = r346621 * r346633;
double r346639 = r346638 / r346622;
double r346640 = r346634 * r346621;
double r346641 = r346640 / r346622;
double r346642 = r346639 - r346641;
double r346643 = r346642 + r346634;
double r346644 = r346632 ? r346637 : r346643;
return r346644;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.0 |
|---|---|
| Target | 2.3 |
| Herbie | 1.0 |
if (/ x y) < -3.979152001453562e-163 or 8.23383008289745e-230 < (/ x y) < 2.6979942480068814e+197Initial program 1.1
if -3.979152001453562e-163 < (/ x y) < 8.23383008289745e-230 or 2.6979942480068814e+197 < (/ x y) Initial program 3.8
rmApplied add-cube-cbrt4.0
Applied add-cube-cbrt4.0
Applied times-frac4.0
Applied associate-*l*0.6
rmApplied div-inv0.6
Applied associate-*l*0.5
Simplified0.5
Taylor expanded around 0 0.9
Final simplification1.0
herbie shell --seed 2019199
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
:herbie-target
(if (< z 2.759456554562692e-282) (+ (* (/ x y) (- z t)) t) (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) (+ (* (/ x y) (- z t)) t)))
(+ (* (/ x y) (- z t)) t))