\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)} \leq -\infty:\\
\;\;\;\;-\frac{x}{z + -1}\\
\mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq -2.7646989191220188 \cdot 10^{-307}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + \left(z \cdot b - y \cdot z\right)}\\
\mathbf{elif}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 0 \lor \neg \left(\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq 1.1752269890446499 \cdot 10^{+300}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)} + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(FPCore (x y z t a b)
:precision binary64
(if (<= (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) (- INFINITY))
(- (/ x (+ z -1.0)))
(if (<=
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y))))
-2.7646989191220188e-307)
(/ (+ (* x y) (* z (- t a))) (+ y (- (* z b) (* y z))))
(if (or (<= (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) 0.0)
(not
(<=
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y))))
1.1752269890446499e+300)))
(/ (- a t) (- y b))
(+
(/ (* x y) (+ y (* z (- b y))))
(/ (* z (- t a)) (+ y (* z (- b y)))))))))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 tmp;
if ((((x * y) + (z * (t - a))) / (y + (z * (b - y)))) <= -((double) INFINITY)) {
tmp = -(x / (z + -1.0));
} else if ((((x * y) + (z * (t - a))) / (y + (z * (b - y)))) <= -2.7646989191220188e-307) {
tmp = ((x * y) + (z * (t - a))) / (y + ((z * b) - (y * z)));
} else if (((((x * y) + (z * (t - a))) / (y + (z * (b - y)))) <= 0.0) || !((((x * y) + (z * (t - a))) / (y + (z * (b - y)))) <= 1.1752269890446499e+300)) {
tmp = (a - t) / (y - b);
} else {
tmp = ((x * y) / (y + (z * (b - y)))) + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}




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 | 17.9 |
| Herbie | 8.9 |
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 64.0
rmApplied clear-num_binary6464.0
Simplified64.0
Taylor expanded around -inf 31.0
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.7646989191220188e-307Initial program 0.3
Taylor expanded around 0 0.3
if -2.7646989191220188e-307 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 1.1752269890446499e300 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 58.7
rmApplied clear-num_binary6458.8
Simplified58.8
Taylor expanded around -inf 20.2
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.1752269890446499e300Initial program 0.4
Taylor expanded around 0 0.4
Simplified0.4
Final simplification8.9
herbie shell --seed 2021174
(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)))))