\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\begin{array}{l}
\mathbf{if}\;z \le -1.1016366134119363 \cdot 10^{217} \lor \neg \left(z \le 3.9048530732432371 \cdot 10^{76}\right):\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y + z \cdot \left(b - y\right)}{x \cdot y + z \cdot \left(t - a\right)}}\\
\end{array}double code(double x, double y, double z, double t, double a, double b) {
return (((x * y) + (z * (t - a))) / (y + (z * (b - y))));
}
double code(double x, double y, double z, double t, double a, double b) {
double temp;
if (((z <= -1.1016366134119363e+217) || !(z <= 3.904853073243237e+76))) {
temp = ((t / b) - (a / b));
} else {
temp = (1.0 / ((y + (z * (b - y))) / ((x * y) + (z * (t - a)))));
}
return temp;
}




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.4 |
|---|---|
| Target | 18.5 |
| Herbie | 19.9 |
if z < -1.1016366134119363e+217 or 3.904853073243237e+76 < z Initial program 47.7
rmApplied clear-num47.7
rmApplied div-inv47.7
Applied add-sqr-sqrt47.7
Applied times-frac47.7
Simplified47.7
Simplified47.7
Taylor expanded around inf 33.2
if -1.1016366134119363e+217 < z < 3.904853073243237e+76Initial program 15.3
rmApplied clear-num15.5
Final simplification19.9
herbie shell --seed 2020057 +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)))))