I want to use dgesdd to compute a SVD decomposition. (JOBZ = 'A').
As suggested in documentation, I make a memory query to know the optimal size of "work".
The numbers I get for lwork does not agree with the formula given in the documentation.
For example : with a (322,288) matrix, the code gives optimal lwork = 250848, although I expected from the formula : lwork >= 3 * 288^2 + 4 * 288^2 + 4 * 288 = 581760 .
Is there an error in the documentation, or in my code ?
Thanks for help