\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.971825994473462967444916924423559119718 \cdot 10^{122}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \le -2.796826227540087352386099490764401515765 \cdot 10^{-172}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, x, \left(t - a\right) \cdot z\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{elif}\;y \le 5.963446547461525348794679545605033353565 \cdot 10^{-202}:\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\mathbf{elif}\;y \le 2.0360845306702607886990471003994885178 \cdot 10^{199}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, x, \left(t - a\right) \cdot z\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r32934930 = x;
double r32934931 = y;
double r32934932 = r32934930 * r32934931;
double r32934933 = z;
double r32934934 = t;
double r32934935 = a;
double r32934936 = r32934934 - r32934935;
double r32934937 = r32934933 * r32934936;
double r32934938 = r32934932 + r32934937;
double r32934939 = b;
double r32934940 = r32934939 - r32934931;
double r32934941 = r32934933 * r32934940;
double r32934942 = r32934931 + r32934941;
double r32934943 = r32934938 / r32934942;
return r32934943;
}
double f(double x, double y, double z, double t, double a, double b) {
double r32934944 = y;
double r32934945 = -1.971825994473463e+122;
bool r32934946 = r32934944 <= r32934945;
double r32934947 = x;
double r32934948 = -2.7968262275400874e-172;
bool r32934949 = r32934944 <= r32934948;
double r32934950 = t;
double r32934951 = a;
double r32934952 = r32934950 - r32934951;
double r32934953 = z;
double r32934954 = r32934952 * r32934953;
double r32934955 = fma(r32934944, r32934947, r32934954);
double r32934956 = b;
double r32934957 = r32934956 - r32934944;
double r32934958 = fma(r32934953, r32934957, r32934944);
double r32934959 = r32934955 / r32934958;
double r32934960 = 5.963446547461525e-202;
bool r32934961 = r32934944 <= r32934960;
double r32934962 = r32934950 / r32934956;
double r32934963 = r32934951 / r32934956;
double r32934964 = r32934962 - r32934963;
double r32934965 = 2.036084530670261e+199;
bool r32934966 = r32934944 <= r32934965;
double r32934967 = r32934966 ? r32934959 : r32934947;
double r32934968 = r32934961 ? r32934964 : r32934967;
double r32934969 = r32934949 ? r32934959 : r32934968;
double r32934970 = r32934946 ? r32934947 : r32934969;
return r32934970;
}




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 | 22.9 |
|---|---|
| Target | 17.8 |
| Herbie | 23.1 |
if y < -1.971825994473463e+122 or 2.036084530670261e+199 < y Initial program 38.2
Simplified38.2
rmApplied clear-num38.2
Taylor expanded around 0 36.6
if -1.971825994473463e+122 < y < -2.7968262275400874e-172 or 5.963446547461525e-202 < y < 2.036084530670261e+199Initial program 18.8
Simplified18.8
rmApplied sub-neg18.8
Applied distribute-rgt-in18.8
rmApplied div-inv18.9
rmApplied associate-*r/18.8
Simplified18.8
if -2.7968262275400874e-172 < y < 5.963446547461525e-202Initial program 14.8
Simplified14.8
rmApplied clear-num14.9
Taylor expanded around inf 18.1
Final simplification23.1
herbie shell --seed 2019171 +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)))))