\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;y \le -3.21055735945889373 \cdot 10^{-23} \lor \neg \left(y \le 1091385.99807113851\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t} \cdot z}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\end{array}double code(double x, double y, double z, double t, double a, double b) {
return ((double) (((double) (x + ((double) (((double) (y * z)) / t)))) / ((double) (((double) (a + 1.0)) + ((double) (((double) (y * b)) / t))))));
}
double code(double x, double y, double z, double t, double a, double b) {
double VAR;
if (((y <= -3.210557359458894e-23) || !(y <= 1091385.9980711385))) {
VAR = ((double) (((double) (x + ((double) (y / ((double) (t / z)))))) / ((double) (((double) (a + 1.0)) + ((double) (y * ((double) (b / t))))))));
} else {
VAR = ((double) (((double) (x + ((double) (((double) (y / t)) * z)))) / ((double) (((double) (a + 1.0)) + ((double) (((double) (y * b)) / t))))));
}
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.1 |
|---|---|
| Target | 13.3 |
| Herbie | 12.6 |
if y < -3.21055735945889373e-23 or 1091385.99807113851 < y Initial program 28.5
rmApplied associate-/l*25.7
rmApplied *-un-lft-identity25.7
Applied times-frac21.0
Simplified21.0
if -3.21055735945889373e-23 < y < 1091385.99807113851Initial program 3.8
rmApplied associate-/l*8.3
rmApplied associate-/r/4.2
Final simplification12.6
herbie shell --seed 2020161
(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))))