\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;y \le -8.2653125331085048 \cdot 10^{-21} \lor \neg \left(y \le 7.3212673338659141 \cdot 10^{-53}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{\frac{y}{t}}{\frac{1}{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 ((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 (((y <= -8.265312533108505e-21) || !(y <= 7.321267333865914e-53))) {
VAR = ((x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))));
} else {
VAR = ((x + ((y / t) / (1.0 / z))) / ((a + 1.0) + ((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.6 |
|---|---|
| Target | 13.5 |
| Herbie | 12.8 |
if y < -8.265312533108505e-21 or 7.321267333865914e-53 < y Initial program 27.6
rmApplied associate-/l*24.2
rmApplied *-un-lft-identity24.2
Applied times-frac20.3
Simplified20.3
if -8.265312533108505e-21 < y < 7.321267333865914e-53Initial program 3.4
rmApplied associate-/l*8.3
rmApplied div-inv8.3
Applied associate-/r*4.0
Final simplification12.8
herbie shell --seed 2020091
(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))))