\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 -7.09669501949738936499941568471402397685 \cdot 10^{-293}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{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.365170107416157809932424091751188734223 \cdot 10^{290}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{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 r789759 = x;
double r789760 = y;
double r789761 = r789759 * r789760;
double r789762 = z;
double r789763 = t;
double r789764 = a;
double r789765 = r789763 - r789764;
double r789766 = r789762 * r789765;
double r789767 = r789761 + r789766;
double r789768 = b;
double r789769 = r789768 - r789760;
double r789770 = r789762 * r789769;
double r789771 = r789760 + r789770;
double r789772 = r789767 / r789771;
return r789772;
}
double f(double x, double y, double z, double t, double a, double b) {
double r789773 = x;
double r789774 = y;
double r789775 = r789773 * r789774;
double r789776 = z;
double r789777 = t;
double r789778 = a;
double r789779 = r789777 - r789778;
double r789780 = r789776 * r789779;
double r789781 = r789775 + r789780;
double r789782 = b;
double r789783 = r789782 - r789774;
double r789784 = r789776 * r789783;
double r789785 = r789774 + r789784;
double r789786 = r789781 / r789785;
double r789787 = -inf.0;
bool r789788 = r789786 <= r789787;
double r789789 = -7.096695019497389e-293;
bool r789790 = r789786 <= r789789;
double r789791 = 0.0;
bool r789792 = r789786 <= r789791;
double r789793 = r789777 / r789782;
double r789794 = r789778 / r789782;
double r789795 = r789793 - r789794;
double r789796 = 3.365170107416158e+290;
bool r789797 = r789786 <= r789796;
double r789798 = r789797 ? r789786 : r789795;
double r789799 = r789792 ? r789795 : r789798;
double r789800 = r789790 ? r789786 : r789799;
double r789801 = r789788 ? r789773 : r789800;
return r789801;
}




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 | 23.2 |
|---|---|
| Target | 18.0 |
| Herbie | 15.0 |
if (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) < -inf.0Initial program 64.0
rmApplied clear-num64.0
rmApplied div-inv64.0
Applied add-cube-cbrt64.0
Applied times-frac64.0
Simplified64.0
Simplified64.0
Taylor expanded around 0 37.6
if -inf.0 < (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) < -7.096695019497389e-293 or 0.0 < (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) < 3.365170107416158e+290Initial program 3.6
if -7.096695019497389e-293 < (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) < 0.0 or 3.365170107416158e+290 < (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) Initial program 59.7
rmApplied clear-num59.7
rmApplied div-inv59.7
Applied add-cube-cbrt59.7
Applied times-frac59.7
Simplified59.7
Simplified59.7
Taylor expanded around inf 39.7
Final simplification15.0
herbie shell --seed 2020001 +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)))))