\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\begin{array}{l}
\mathbf{if}\;z \le -4.62529910386796021 \cdot 10^{132} \lor \neg \left(z \le 1.3201406329171877 \cdot 10^{89}\right):\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, \left(t - a\right) \cdot z\right)}{z \cdot \left(b - y\right) + y}\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r556514 = x;
double r556515 = y;
double r556516 = r556514 * r556515;
double r556517 = z;
double r556518 = t;
double r556519 = a;
double r556520 = r556518 - r556519;
double r556521 = r556517 * r556520;
double r556522 = r556516 + r556521;
double r556523 = b;
double r556524 = r556523 - r556515;
double r556525 = r556517 * r556524;
double r556526 = r556515 + r556525;
double r556527 = r556522 / r556526;
return r556527;
}
double f(double x, double y, double z, double t, double a, double b) {
double r556528 = z;
double r556529 = -4.62529910386796e+132;
bool r556530 = r556528 <= r556529;
double r556531 = 1.3201406329171877e+89;
bool r556532 = r556528 <= r556531;
double r556533 = !r556532;
bool r556534 = r556530 || r556533;
double r556535 = t;
double r556536 = b;
double r556537 = r556535 / r556536;
double r556538 = a;
double r556539 = r556538 / r556536;
double r556540 = r556537 - r556539;
double r556541 = x;
double r556542 = y;
double r556543 = r556535 - r556538;
double r556544 = r556543 * r556528;
double r556545 = fma(r556541, r556542, r556544);
double r556546 = r556536 - r556542;
double r556547 = r556528 * r556546;
double r556548 = r556547 + r556542;
double r556549 = r556545 / r556548;
double r556550 = r556534 ? r556540 : r556549;
return r556550;
}




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.3 |
|---|---|
| Target | 18.1 |
| Herbie | 19.2 |
if z < -4.62529910386796e+132 or 1.3201406329171877e+89 < z Initial program 47.2
Simplified47.2
rmApplied clear-num47.3
Taylor expanded around inf 34.0
if -4.62529910386796e+132 < z < 1.3201406329171877e+89Initial program 12.4
Simplified12.4
rmApplied clear-num12.5
rmApplied add-cube-cbrt12.5
Applied associate-/l*12.5
Simplified12.5
rmApplied *-un-lft-identity12.5
Applied *-un-lft-identity12.5
Applied times-frac12.5
Applied times-frac12.5
Simplified12.5
Simplified12.4
rmApplied fma-udef12.4
Final simplification19.2
herbie shell --seed 2019198 +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)))))