  In this paper a new fast algorithm for the computation of the distance of a
matrix to a nearby defective matrix is presented. The problem is formulated
following Alam & Bora (Linear Algebra Appl., 396 (2005), pp.~273--301) and
reduces to finding when a parameter-dependent matrix is singular subject to a
constraint. The solution is achieved by an extension of the Implicit
Determinant Method introduced by Spence & Poulton (J. Comput. Phys., 204
(2005), pp.~65--81). Numerical results for several examples illustrate the
performance of the algorithm.
