\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;t \le -6.7379868295915352 \cdot 10^{-174}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \le 1.42215465614168004 \cdot 10^{-22}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{1}{\frac{t}{y \cdot b}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}double code(double x, double y, double z, double t, double a, double b) {
return ((x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)));
}
double code(double x, double y, double z, double t, double a, double b) {
double VAR;
if ((t <= -6.737986829591535e-174)) {
VAR = ((x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))));
} else {
double VAR_1;
if ((t <= 1.42215465614168e-22)) {
VAR_1 = ((x + ((y * z) / t)) / ((a + 1.0) + (1.0 / (t / (y * b)))));
} else {
VAR_1 = ((x + (y * (z / t))) / ((a + 1.0) + (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.8 |
|---|---|
| Target | 13.4 |
| Herbie | 13.8 |
if t < -6.737986829591535e-174Initial program 13.5
rmApplied *-un-lft-identity13.5
Applied times-frac13.0
Simplified13.0
rmApplied associate-/l*10.8
if -6.737986829591535e-174 < t < 1.42215465614168e-22Initial program 24.9
rmApplied clear-num24.9
if 1.42215465614168e-22 < t Initial program 11.8
rmApplied *-un-lft-identity11.8
Applied times-frac9.1
Simplified9.1
rmApplied *-un-lft-identity9.1
Applied times-frac4.6
Simplified4.6
Final simplification13.8
herbie shell --seed 2020103
(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 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1) (/ (* y b) t))))