I am using LAPACK to obtain the minimum norm least squares solution to a rank-deficient double precision (real) system of equations, see:
I used two of the routines provided for this in LAPACK: DGELSS and DGELSD, and obtained different answers from each. I also tried using the SVD routine in Numerical Recipes and obtained a third answer (different from the above two). All three solutions satisfy the original system of equations.
There are of course and infinite number of solutions to a rank-deficient system of equations, but there is only one that has a minimum norm. Of the three solutions I obtained the Numerical Recipes code gave the result with the lowest norm. The norms of the two LAPACK solutions were larger and different from each other. I don't understand why the LAPACK routines do not give me the same result as the Numerical Recipes code.
What am I missing?