A colleague has encountered an instability when computing the determinant of a matrix.
For this matrix : $$\begin{bmatrix} 123.585 &-1.33458 &78.9871 &43.2638\\ -1.33458 &190.581 &88.7218 &100.524\\ 78.9871 &88.7218 &167.465 &0.244369\\ 43.2638 &100.524 &0.244369 &143.544 \end{bmatrix}$$ the determinant is: $2077.34$
While, for this matrix (rounding of the digits) $$\begin{bmatrix} 123.6 &-1.335 &78.99 &43.26\\ -1.335 &190.6 &88.72 &100.5\\ 78.99 &88.72 &167.5 &0.2444\\ 43.26 &100.5 &0.2444 &143.5 \end{bmatrix}$$
This gives the determinant : $138949$
Why/Where is the instability coming from ?
Bonus : is there a way to have a stability ?

Let us call $M_1$ and $M_2$ the two matrices.
They have the resp. spectra :
$$ S_1=\{0.000294498, 121.945486280, 177.683446086, 325.545773134\}$$
$$S_2= \{0.019697264, 121.950561034, 177.688725537, 325.541016164\}$$
(I am fully conscious that there are too many decimals, considering the roundoff or entries).
Remark : $M_1$ and $M_2$ are symmetric definite positive (all their eigenvalues are $>0$) : a category of matrices that can not be ranked among the worst a priori.
There are different levels of explanations. I will only consider two.
Here is a first one : the "condition numbers" (ratios $\sigma_1/\sigma_4$ of singular values) of these matrices are very high, especially for $M_1$ : $1.1 \times 10^6$ which is huge, indicating that intrinsically $M_1$ is very unstable.
Having a closer look at the spectra, we see that, set apart the first pair of eigenvalues, the rsp. ratios of the other ones are very close to $1$.
Therefore, it will not come as a surprize (the determinant of a matrix being the product of its eigenvalues) that the ratio of the first two eigenvalues, $\approx 66.8840$ is very close to the ratio of determinants which is $\approx 66.8879$.
This shows that this issue of sensibility of determinants can be transfered into an issue of sensibility of the smallest eigenvalue.
I will only provide an insight about the situation by using the pencil of matrices
$$A_x=M_2+x(M_1-M_2)$$
and the attached following functions :
$f(x):=\det(A_x)$ and $g(x) := $ smallest eigenvalue of $A_x$,
for $x=0$ (case of matrix $M_2$) to $x=1$ (case of matrix $M_1$).
What do we see ? That when $x=1$, we are very close to a "catastrophic" situation where, at approximately $x \approx 1.0152$, i.e., at a very small distance of $M_1$, we have a zero determinant... As we have said, this trend can be as well rendered by function $g$ (that has been represented on the same graphic, but with ordinate axis unit multiplied by $10^7$...
Fig. 1 : Graphical representation of functions $f$ (blue) and $g$ ($\times 10^7$) (red) displaying a very similar behavior.
How to go further ? There are many sophisticated ways to analyse sensitivity of eigenvalues. I will not enter into this highly specialized domain, using very specific tools like pseudospectra, etc.