\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;t \le -9.6658986432199709 \cdot 10^{75} \lor \neg \left(t \le 18.127867323356519\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{1}{\frac{t}{b}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{1}{\frac{t}{y \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) (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 (((t <= -9.665898643219971e+75) || !(t <= 18.12786732335652))) {
VAR = (((double) (x + ((double) (y * (z / t))))) / ((double) (((double) (a + 1.0)) + ((double) (y * (1.0 / (t / b)))))));
} else {
VAR = (((double) (x + (1.0 / (t / ((double) (y * z)))))) / ((double) (((double) (a + 1.0)) + (((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.7 |
|---|---|
| Target | 13.5 |
| Herbie | 12.9 |
if t < -9.6658986432199709e75 or 18.127867323356519 < t Initial program 12.4
rmApplied associate-/l*9.1
rmApplied *-un-lft-identity9.1
Applied times-frac3.9
Simplified3.9
rmApplied div-inv3.9
if -9.6658986432199709e75 < t < 18.127867323356519Initial program 20.4
rmApplied clear-num20.4
Final simplification12.9
herbie shell --seed 2020182
(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))))