\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;y \leq -2.5557366500054176 \cdot 10^{+50}:\\
\;\;\;\;\frac{1}{\frac{a + \left(1 + y \cdot \frac{b}{t}\right)}{x + y \cdot \frac{z}{t}}}\\
\mathbf{elif}\;y \leq 4.225386107957482 \cdot 10^{+45}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y \cdot \frac{z}{t}\right) \cdot \frac{1}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\
\end{array}double code(double x, double y, double z, double t, double a, double b) {
return (((double) (x + (((double) (y * z)) / t))) / ((double) (((double) (a + 1.0)) + (((double) (y * b)) / t))));
}
double code(double x, double y, double z, double t, double a, double b) {
double VAR;
if ((y <= -2.5557366500054176e+50)) {
VAR = (1.0 / (((double) (a + ((double) (1.0 + ((double) (y * (b / t))))))) / ((double) (x + ((double) (y * (z / t)))))));
} else {
double VAR_1;
if ((y <= 4.225386107957482e+45)) {
VAR_1 = (((double) (x + (((double) (y * z)) / t))) / ((double) (((double) (a + 1.0)) + (((double) (y * b)) / t))));
} else {
VAR_1 = ((double) (((double) (x + ((double) (y * (z / t))))) * (1.0 / ((double) (a + ((double) (1.0 + ((double) (y * (b / t))))))))));
}
VAR = VAR_1;
}
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 | 16.7 |
|---|---|
| Target | 13.4 |
| Herbie | 12.9 |
if y < -2.55573665000541761e50Initial program 33.7
Simplified23.5
rmApplied clear-num23.7
if -2.55573665000541761e50 < y < 4.2253861079574818e45Initial program 5.3
if 4.2253861079574818e45 < y Initial program 33.2
Simplified24.2
rmApplied div-inv24.2
Final simplification12.9
herbie shell --seed 2020196
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:herbie-target
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))