\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 5.66500938043718374 \cdot 10^{306}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, x, z \cdot \left(t - a\right)\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 r917298 = x;
double r917299 = y;
double r917300 = r917298 * r917299;
double r917301 = z;
double r917302 = t;
double r917303 = a;
double r917304 = r917302 - r917303;
double r917305 = r917301 * r917304;
double r917306 = r917300 + r917305;
double r917307 = b;
double r917308 = r917307 - r917299;
double r917309 = r917301 * r917308;
double r917310 = r917299 + r917309;
double r917311 = r917306 / r917310;
return r917311;
}
double f(double x, double y, double z, double t, double a, double b) {
double r917312 = x;
double r917313 = y;
double r917314 = r917312 * r917313;
double r917315 = z;
double r917316 = t;
double r917317 = a;
double r917318 = r917316 - r917317;
double r917319 = r917315 * r917318;
double r917320 = r917314 + r917319;
double r917321 = b;
double r917322 = r917321 - r917313;
double r917323 = r917315 * r917322;
double r917324 = r917313 + r917323;
double r917325 = r917320 / r917324;
double r917326 = -inf.0;
bool r917327 = r917325 <= r917326;
double r917328 = 5.665009380437184e+306;
bool r917329 = r917325 <= r917328;
double r917330 = fma(r917313, r917312, r917319);
double r917331 = r917330 / r917324;
double r917332 = r917316 / r917321;
double r917333 = r917317 / r917321;
double r917334 = r917332 - r917333;
double r917335 = r917329 ? r917331 : r917334;
double r917336 = r917327 ? r917312 : r917335;
return r917336;
}




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 | 23.5 |
|---|---|
| Target | 18.1 |
| Herbie | 15.9 |
if (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) < -inf.0Initial program 64.0
rmApplied clear-num64.0
Simplified64.0
Taylor expanded around 0 34.1
if -inf.0 < (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) < 5.665009380437184e+306Initial program 5.8
rmApplied add-cube-cbrt6.3
rmApplied *-un-lft-identity6.3
Applied associate-/r*6.3
Simplified5.8
if 5.665009380437184e+306 < (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) Initial program 64.0
rmApplied clear-num64.0
Simplified64.0
Taylor expanded around inf 40.9
Final simplification15.9
herbie shell --seed 2020083 +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)))))