\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;y \le -6.6031014728832484 \cdot 10^{96} \lor \neg \left(y \le 9.53884126376018804 \cdot 10^{-56}\right):\\
\;\;\;\;\frac{1}{\frac{a + \left(1 + y \cdot \frac{b}{t}\right)}{x + y \cdot \frac{z}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{1}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\
\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 <= -6.603101472883248e+96) || !(y <= 9.538841263760188e-56))) {
VAR = ((double) (1.0 / ((double) (((double) (a + ((double) (1.0 + ((double) (y * ((double) (b / t)))))))) / ((double) (x + ((double) (y * ((double) (z / t))))))))));
} else {
VAR = ((double) (((double) (x + ((double) (((double) (y * z)) / t)))) * ((double) (1.0 / ((double) (a + ((double) (1.0 + ((double) (b * ((double) (y / 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.5 |
| Herbie | 13.2 |
if y < -6.6031014728832484e96 or 9.53884126376018804e-56 < y Initial program 29.5
rmApplied clear-num29.7
Simplified22.4
if -6.6031014728832484e96 < y < 9.53884126376018804e-56Initial program 5.3
rmApplied add-cube-cbrt5.5
Applied associate-/r*5.5
Simplified5.3
rmApplied div-inv5.3
Simplified5.3
Final simplification13.2
herbie shell --seed 2020184
(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))))