\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\begin{array}{l}
\mathbf{if}\;y \le -1.6135453347029501 \cdot 10^{206}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \le -9.6135948299916979 \cdot 10^{-302}:\\
\;\;\;\;\frac{\frac{1}{\mathsf{fma}\left(z, b - y, y\right)}}{\frac{1}{x \cdot y + z \cdot \left(t - a\right)}}\\
\mathbf{elif}\;y \le 9.7300293885933668 \cdot 10^{-234}:\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\mathbf{elif}\;y \le 7.4602105074600277 \cdot 10^{253}:\\
\;\;\;\;\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + \left(z \cdot \left(\sqrt[3]{b - y} \cdot \sqrt[3]{b - y}\right)\right) \cdot \sqrt[3]{b - y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\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 ((y <= -1.61354533470295e+206)) {
temp = x;
} else {
double temp_1;
if ((y <= -9.613594829991698e-302)) {
temp_1 = ((1.0 / fma(z, (b - y), y)) / (1.0 / ((x * y) + (z * (t - a)))));
} else {
double temp_2;
if ((y <= 9.730029388593367e-234)) {
temp_2 = ((t / b) - (a / b));
} else {
double temp_3;
if ((y <= 7.460210507460028e+253)) {
temp_3 = (((x * y) + (z * (t - a))) * (1.0 / (y + ((z * (cbrt((b - y)) * cbrt((b - y)))) * cbrt((b - y))))));
} else {
temp_3 = x;
}
temp_2 = temp_3;
}
temp_1 = temp_2;
}
temp = temp_1;
}
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.3 |
|---|---|
| Target | 18.3 |
| Herbie | 22.1 |
if y < -1.61354533470295e+206 or 7.460210507460028e+253 < y Initial program 44.1
rmApplied clear-num44.2
rmApplied div-inv44.2
Applied associate-/r*44.2
Simplified44.2
Taylor expanded around 0 34.3
if -1.61354533470295e+206 < y < -9.613594829991698e-302Initial program 19.0
rmApplied clear-num19.1
rmApplied div-inv19.2
Applied associate-/r*19.1
Simplified19.1
if -9.613594829991698e-302 < y < 9.730029388593367e-234Initial program 16.2
rmApplied clear-num16.3
rmApplied div-inv16.6
Applied associate-/r*16.5
Simplified16.5
Taylor expanded around inf 14.4
if 9.730029388593367e-234 < y < 7.460210507460028e+253Initial program 22.0
rmApplied div-inv22.1
rmApplied add-cube-cbrt22.4
Applied associate-*r*22.4
Final simplification22.1
herbie shell --seed 2020049 +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)))))