\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;z \le -4.4005240874132211 \cdot 10^{-116} \lor \neg \left(z \le 1.12880810670166501 \cdot 10^{-262}\right):\\
\;\;\;\;\frac{x + \frac{1}{\frac{\frac{t}{y}}{z}}}{\left(a + 1\right) + \frac{y}{t} \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\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 temp;
if (((z <= -4.400524087413221e-116) || !(z <= 1.128808106701665e-262))) {
temp = ((x + (1.0 / ((t / y) / z))) / ((a + 1.0) + ((y / t) * b)));
} else {
temp = ((x + (y * (z / t))) / ((a + 1.0) + ((y * b) / t)));
}
return temp;
}




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.6 |
| Herbie | 13.8 |
if z < -4.400524087413221e-116 or 1.128808106701665e-262 < z Initial program 19.3
rmApplied associate-/l*19.7
rmApplied associate-/r/18.4
rmApplied clear-num18.4
rmApplied associate-/r*15.6
if -4.400524087413221e-116 < z < 1.128808106701665e-262Initial program 7.4
rmApplied *-un-lft-identity7.4
Applied times-frac7.1
Simplified7.1
Final simplification13.8
herbie shell --seed 2020060
(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))))