\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;y \le -3.48807325200822817 \cdot 10^{64} \lor \neg \left(y \le 1.05370615499450104 \cdot 10^{-49}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\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) (((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.488073252008228e+64) || !(y <= 1.053706154994501e-49))) {
VAR = ((double) (((double) (x + ((double) (y * ((double) (z / t)))))) / ((double) (((double) (a + 1.0)) + ((double) (y / ((double) (t / b))))))));
} else {
VAR = ((double) (((double) (x + ((double) (1.0 / ((double) (t / ((double) (y * 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.5 |
|---|---|
| Target | 13.3 |
| Herbie | 13.1 |
if y < -3.48807325200822817e64 or 1.05370615499450104e-49 < y Initial program 29.5
rmApplied *-un-lft-identity29.5
Applied times-frac26.4
Simplified26.4
rmApplied associate-/l*22.2
if -3.48807325200822817e64 < y < 1.05370615499450104e-49Initial program 4.6
rmApplied clear-num4.6
Final simplification13.1
herbie shell --seed 2020149
(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))))