\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 r692067 = x;
double r692068 = y;
double r692069 = r692067 * r692068;
double r692070 = z;
double r692071 = t;
double r692072 = a;
double r692073 = r692071 - r692072;
double r692074 = r692070 * r692073;
double r692075 = r692069 + r692074;
double r692076 = b;
double r692077 = r692076 - r692068;
double r692078 = r692070 * r692077;
double r692079 = r692068 + r692078;
double r692080 = r692075 / r692079;
return r692080;
}
double f(double x, double y, double z, double t, double a, double b) {
double r692081 = x;
double r692082 = y;
double r692083 = r692081 * r692082;
double r692084 = z;
double r692085 = t;
double r692086 = a;
double r692087 = r692085 - r692086;
double r692088 = r692084 * r692087;
double r692089 = r692083 + r692088;
double r692090 = b;
double r692091 = r692090 - r692082;
double r692092 = r692084 * r692091;
double r692093 = r692082 + r692092;
double r692094 = r692089 / r692093;
double r692095 = -inf.0;
bool r692096 = r692094 <= r692095;
double r692097 = -7.096695019497389e-293;
bool r692098 = r692094 <= r692097;
double r692099 = 0.0;
bool r692100 = r692094 <= r692099;
double r692101 = r692085 / r692090;
double r692102 = r692086 / r692090;
double r692103 = r692101 - r692102;
double r692104 = 3.365170107416158e+290;
bool r692105 = r692094 <= r692104;
double r692106 = r692105 ? r692094 : r692103;
double r692107 = r692100 ? r692103 : r692106;
double r692108 = r692098 ? r692094 : r692107;
double r692109 = r692096 ? r692081 : r692108;
return r692109;
}




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)))))