\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 r840469 = x;
double r840470 = y;
double r840471 = r840469 * r840470;
double r840472 = z;
double r840473 = t;
double r840474 = a;
double r840475 = r840473 - r840474;
double r840476 = r840472 * r840475;
double r840477 = r840471 + r840476;
double r840478 = b;
double r840479 = r840478 - r840470;
double r840480 = r840472 * r840479;
double r840481 = r840470 + r840480;
double r840482 = r840477 / r840481;
return r840482;
}
double f(double x, double y, double z, double t, double a, double b) {
double r840483 = x;
double r840484 = y;
double r840485 = r840483 * r840484;
double r840486 = z;
double r840487 = t;
double r840488 = a;
double r840489 = r840487 - r840488;
double r840490 = r840486 * r840489;
double r840491 = r840485 + r840490;
double r840492 = b;
double r840493 = r840492 - r840484;
double r840494 = r840486 * r840493;
double r840495 = r840484 + r840494;
double r840496 = r840491 / r840495;
double r840497 = -inf.0;
bool r840498 = r840496 <= r840497;
double r840499 = -7.096695019497389e-293;
bool r840500 = r840496 <= r840499;
double r840501 = 0.0;
bool r840502 = r840496 <= r840501;
double r840503 = r840487 / r840492;
double r840504 = r840488 / r840492;
double r840505 = r840503 - r840504;
double r840506 = 3.365170107416158e+290;
bool r840507 = r840496 <= r840506;
double r840508 = r840507 ? r840496 : r840505;
double r840509 = r840502 ? r840505 : r840508;
double r840510 = r840500 ? r840496 : r840509;
double r840511 = r840498 ? r840483 : r840510;
return r840511;
}




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