On exit: B is overwritten by the n by r solution matrix X. If m≥n and RANK=n, the residual sum of squares for the solution in the ith column is given by the sum of squares of elements n+1,…,m in that column.

7: LDB – INTEGERInput

On entry: the first dimension of the array B as declared in the (sub)program from which F08KAF (DGELSS) is called.

On entry: used to determine the effective rank of A. Singular values Si≤RCOND×S1 are treated as zero. If RCOND<0, machine precision is used instead.

10: RANK – INTEGEROutput

On exit: the effective rank of A, i.e., the number of singular values which are greater than RCOND×S1.

11: WORK(max1,LWORK) – REAL (KIND=nag_wp) arrayWorkspace

On exit: if INFO=0, WORK1 contains the minimum value of LWORK required for optimal performance.

12: LWORK – INTEGERInput

On entry: the dimension of the array WORK as declared in the (sub)program from which F08KAF (DGELSS) is called.

If LWORK=-1, a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued.

Suggested value:
for optimal performance, LWORK should generally be larger. Consider increasing LWORK by at least nb×minM,N, where nb is the optimal block size.