\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.5161511486463831 \cdot 10^{203} \lor \neg \left(z \le 4.74132684413093719 \cdot 10^{62}\right):\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}\\
\end{array}double code(double x, double y, double z, double t, double a, double b) {
return ((double) (((double) (((double) (x * y)) + ((double) (z * ((double) (t - a)))))) / ((double) (y + ((double) (z * ((double) (b - y))))))));
}
double code(double x, double y, double z, double t, double a, double b) {
double VAR;
if (((z <= -3.516151148646383e+203) || !(z <= 4.741326844130937e+62))) {
VAR = ((double) (((double) (t / b)) - ((double) (a / b))));
} else {
VAR = ((double) (((double) (((double) (x * y)) + ((double) (z * ((double) (t - a)))))) * ((double) (1.0 / ((double) (y + ((double) (z * ((double) (b - y))))))))));
}
return VAR;
}




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.0 |
|---|---|
| Target | 17.6 |
| Herbie | 19.8 |
if z < -3.516151148646383e+203 or 4.741326844130937e+62 < z Initial program 46.5
rmApplied clear-num46.6
Simplified46.6
Taylor expanded around inf 34.7
if -3.516151148646383e+203 < z < 4.741326844130937e+62Initial program 13.9
rmApplied div-inv14.0
Final simplification19.8
herbie shell --seed 2020113 +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)))))