\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.0667327550105751 \cdot 10^{75} \lor \neg \left(z \le 9.08101503372451 \cdot 10^{95}\right):\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{\mathsf{fma}\left(z, b - y, y\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 VAR;
if (((z <= -1.066732755010575e+75) || !(z <= 9.081015033724511e+95))) {
VAR = ((t / b) - (a / b));
} else {
VAR = (((x * y) + (z * (t - a))) / fma(z, (b - y), 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.4 |
|---|---|
| Target | 18.1 |
| Herbie | 19.0 |
if z < -1.066732755010575e+75 or 9.081015033724511e+95 < z Initial program 45.8
Taylor expanded around 0 46.2
Simplified45.8
rmApplied clear-num45.8
Taylor expanded around inf 33.4
if -1.066732755010575e+75 < z < 9.081015033724511e+95Initial program 11.3
Taylor expanded around 0 11.3
Simplified11.3
Final simplification19.0
herbie shell --seed 2020078 +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)))))