\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\begin{array}{l}
\mathbf{if}\;z \le -3.01373759864766076 \cdot 10^{106} \lor \neg \left(z \le 9.0608695367454199 \cdot 10^{67}\right):\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\mathsf{fma}\left(b - y, z, y\right)}}{\frac{1}{x \cdot y + z \cdot \left(t - a\right)}}\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r797275 = x;
double r797276 = y;
double r797277 = r797275 * r797276;
double r797278 = z;
double r797279 = t;
double r797280 = a;
double r797281 = r797279 - r797280;
double r797282 = r797278 * r797281;
double r797283 = r797277 + r797282;
double r797284 = b;
double r797285 = r797284 - r797276;
double r797286 = r797278 * r797285;
double r797287 = r797276 + r797286;
double r797288 = r797283 / r797287;
return r797288;
}
double f(double x, double y, double z, double t, double a, double b) {
double r797289 = z;
double r797290 = -3.0137375986476608e+106;
bool r797291 = r797289 <= r797290;
double r797292 = 9.06086953674542e+67;
bool r797293 = r797289 <= r797292;
double r797294 = !r797293;
bool r797295 = r797291 || r797294;
double r797296 = t;
double r797297 = b;
double r797298 = r797296 / r797297;
double r797299 = a;
double r797300 = r797299 / r797297;
double r797301 = r797298 - r797300;
double r797302 = 1.0;
double r797303 = y;
double r797304 = r797297 - r797303;
double r797305 = fma(r797304, r797289, r797303);
double r797306 = r797302 / r797305;
double r797307 = x;
double r797308 = r797307 * r797303;
double r797309 = r797296 - r797299;
double r797310 = r797289 * r797309;
double r797311 = r797308 + r797310;
double r797312 = r797302 / r797311;
double r797313 = r797306 / r797312;
double r797314 = r797295 ? r797301 : r797313;
return r797314;
}




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 | 23.6 |
|---|---|
| Target | 18.0 |
| Herbie | 19.7 |
if z < -3.0137375986476608e+106 or 9.06086953674542e+67 < z Initial program 45.6
rmApplied clear-num45.7
rmApplied div-inv45.7
Applied associate-/r*45.7
Simplified45.7
Taylor expanded around inf 34.1
if -3.0137375986476608e+106 < z < 9.06086953674542e+67Initial program 11.5
rmApplied clear-num11.6
rmApplied div-inv11.8
Applied associate-/r*11.7
Simplified11.7
Final simplification19.7
herbie shell --seed 2020036 +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)))))