\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} = -\infty:\\
\;\;\;\;x\\
\mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \le -3.1179243146321728 \cdot 10^{-291}:\\
\;\;\;\;\frac{x \cdot y + \left(t - a\right) \cdot z}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \le -0.0:\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \le 3.0860807734783257 \cdot 10^{279}:\\
\;\;\;\;\frac{x \cdot y + \left(t - a\right) \cdot z}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r677818 = x;
double r677819 = y;
double r677820 = r677818 * r677819;
double r677821 = z;
double r677822 = t;
double r677823 = a;
double r677824 = r677822 - r677823;
double r677825 = r677821 * r677824;
double r677826 = r677820 + r677825;
double r677827 = b;
double r677828 = r677827 - r677819;
double r677829 = r677821 * r677828;
double r677830 = r677819 + r677829;
double r677831 = r677826 / r677830;
return r677831;
}
double f(double x, double y, double z, double t, double a, double b) {
double r677832 = x;
double r677833 = y;
double r677834 = r677832 * r677833;
double r677835 = z;
double r677836 = t;
double r677837 = a;
double r677838 = r677836 - r677837;
double r677839 = r677835 * r677838;
double r677840 = r677834 + r677839;
double r677841 = b;
double r677842 = r677841 - r677833;
double r677843 = r677835 * r677842;
double r677844 = r677833 + r677843;
double r677845 = r677840 / r677844;
double r677846 = -inf.0;
bool r677847 = r677845 <= r677846;
double r677848 = -3.1179243146321728e-291;
bool r677849 = r677845 <= r677848;
double r677850 = r677838 * r677835;
double r677851 = r677834 + r677850;
double r677852 = r677851 / r677844;
double r677853 = -0.0;
bool r677854 = r677845 <= r677853;
double r677855 = r677836 / r677841;
double r677856 = r677837 / r677841;
double r677857 = r677855 - r677856;
double r677858 = 3.0860807734783257e+279;
bool r677859 = r677845 <= r677858;
double r677860 = r677859 ? r677852 : r677857;
double r677861 = r677854 ? r677857 : r677860;
double r677862 = r677849 ? r677852 : r677861;
double r677863 = r677847 ? r677832 : r677862;
return r677863;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
Results
| Original | 22.8 |
|---|---|
| Target | 17.7 |
| Herbie | 14.8 |
if (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) < -inf.0Initial program 64.0
rmApplied *-commutative64.0
rmApplied clear-num64.0
Simplified64.0
Taylor expanded around 0 37.5
if -inf.0 < (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) < -3.1179243146321728e-291 or -0.0 < (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) < 3.0860807734783257e+279Initial program 0.3
rmApplied *-commutative0.3
if -3.1179243146321728e-291 < (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) < -0.0 or 3.0860807734783257e+279 < (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) Initial program 56.7
rmApplied *-commutative56.7
rmApplied clear-num56.8
Simplified56.8
Taylor expanded around inf 37.8
Final simplification14.8
herbie shell --seed 2020062 +o rules:numerics
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))