I am trying to calculate the minimum eigenvalue of a symmetric tridiagonal matrix using the Sturm sequence and its interlacing property, and the bisection method. One of the step in the process is calculating the number of sign changes in the sequence. I have got the correct answer by calculating the sign change count of the sequence, but this method breaks down for larger matrices, or matrices with large eigenvalues (or very small eigenvalues), in which case the procedure results in overflow or underflow. A solution, as stated in Jennings 1977 book, is to use the ratios of determinants instead:
$q_k(\mu)=\frac{f_k(\mu)}{f_{k-1}(\mu)}$
The recurrence relation is then:
$q_1(\mu)=(\alpha_1 - \mu)$ $q_k(\mu)=(\alpha_k - \mu) - \frac{\beta_{k-1}^2}{q_{k-1}(\mu)} \quad \text{for $k=2,\dots,n$}$
The book also states to replace zeros with a small quantity $(\delta)$ in order to avoid division failures. While trying it out, I do not seem to be getting the same result. Trying for the following symmetric tridiagonal matrix with diagonal elements $\alpha=\{1, 2, 3, 4, 5\}$ and off-diagonal $\beta=\{-1, -1, -1, -1 \}$, and $\mu=2$, I get the original sequence as $\{1, -1, -1, 0, 1, 3\}$ having the number of sign-change count=2. When I use the ratio recurrence formula though, I get the ratio sequence as $\{-1,1, 0.1,-8,11\}$, having sign-change count as 3. I used $\delta=0.1$ for zero.
Why is the difference?