\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\begin{array}{l}
\mathbf{if}\;z \le -5.062409672741701 \cdot 10^{+211}:\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\mathbf{elif}\;z \le -1.5073212909314457 \cdot 10^{-240}:\\
\;\;\;\;\frac{1}{\frac{\mathsf{fma}\left(z, b - y, y\right)}{\mathsf{fma}\left(y, x, z \cdot \left(t - a\right)\right)}}\\
\mathbf{elif}\;z \le 5.972417992529298 \cdot 10^{-285}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \le 8.879606465820762 \cdot 10^{+192}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(z, b - y, y\right)} \cdot \mathsf{fma}\left(y, x, z \cdot \left(t - a\right)\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 r33922974 = x;
double r33922975 = y;
double r33922976 = r33922974 * r33922975;
double r33922977 = z;
double r33922978 = t;
double r33922979 = a;
double r33922980 = r33922978 - r33922979;
double r33922981 = r33922977 * r33922980;
double r33922982 = r33922976 + r33922981;
double r33922983 = b;
double r33922984 = r33922983 - r33922975;
double r33922985 = r33922977 * r33922984;
double r33922986 = r33922975 + r33922985;
double r33922987 = r33922982 / r33922986;
return r33922987;
}
double f(double x, double y, double z, double t, double a, double b) {
double r33922988 = z;
double r33922989 = -5.062409672741701e+211;
bool r33922990 = r33922988 <= r33922989;
double r33922991 = t;
double r33922992 = b;
double r33922993 = r33922991 / r33922992;
double r33922994 = a;
double r33922995 = r33922994 / r33922992;
double r33922996 = r33922993 - r33922995;
double r33922997 = -1.5073212909314457e-240;
bool r33922998 = r33922988 <= r33922997;
double r33922999 = 1.0;
double r33923000 = y;
double r33923001 = r33922992 - r33923000;
double r33923002 = fma(r33922988, r33923001, r33923000);
double r33923003 = x;
double r33923004 = r33922991 - r33922994;
double r33923005 = r33922988 * r33923004;
double r33923006 = fma(r33923000, r33923003, r33923005);
double r33923007 = r33923002 / r33923006;
double r33923008 = r33922999 / r33923007;
double r33923009 = 5.972417992529298e-285;
bool r33923010 = r33922988 <= r33923009;
double r33923011 = 8.879606465820762e+192;
bool r33923012 = r33922988 <= r33923011;
double r33923013 = r33922999 / r33923002;
double r33923014 = r33923013 * r33923006;
double r33923015 = r33923012 ? r33923014 : r33922996;
double r33923016 = r33923010 ? r33923003 : r33923015;
double r33923017 = r33922998 ? r33923008 : r33923016;
double r33923018 = r33922990 ? r33922996 : r33923017;
return r33923018;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
| Original | 22.4 |
|---|---|
| Target | 17.5 |
| Herbie | 20.5 |
if z < -5.062409672741701e+211 or 8.879606465820762e+192 < z Initial program 50.0
rmApplied clear-num50.1
Simplified50.1
Taylor expanded around inf 31.9
if -5.062409672741701e+211 < z < -1.5073212909314457e-240Initial program 19.4
rmApplied clear-num19.5
Simplified19.5
if -1.5073212909314457e-240 < z < 5.972417992529298e-285Initial program 8.3
rmApplied clear-num8.4
Simplified8.4
Taylor expanded around 0 21.3
if 5.972417992529298e-285 < z < 8.879606465820762e+192Initial program 16.6
rmApplied clear-num16.7
Simplified16.7
rmApplied associate-/r/16.6
Final simplification20.5
herbie shell --seed 2019163 +o rules:numerics
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))