Is it a "standard" Math/Numerical-Analysis hack to add a relatively small number e.g. 1*10E-5 to the diagonal of a squared matrix to ensure LU Decomposition (or whichever decomposition algorithm is applicable)? As opposed to "partially/totally pivoting"?
[Edit] The problem: I am computing the regressors for a statistical regression model, and the constraints are that we can no longer bring in any open source software. Hence I am drawing on my undergrad courses in Linear Algebra and Numerical Methods to implement the solution.
I am currently using Croute's LU Decomposition algorithm (http://en.wikipedia.org/wiki/Crout_matrix_decomposition) with partial pivoting on the rows.