I am reading an iterative methods to compute generalized inverses of a matrix. Note that generalized inverse of a matrix $A$ is a matrix $X$ which satisfy
$AXA = A$
I am using matlab program to code various iterative methods to compute generalized inverse of a matrix. I need help to understand how to determine when to stop the iteration. There is a function pinv(A) in a matlab that determines the Moore- Penrose generalized inverse of the matrix. For small order of matrices it is easy to guess when to stop. But for large order matrices how to decide when to stop iteration? I read two different methods for computing generalized inverse
one method has taken stopping criterion as $\| A X_{k}A - A \|\leq 10^{-4} $ while another method has taken $\| A X_{k}A - A \|\leq 10^{-8}$. Where $X_{k}$ is the sequence of approximations for computing generalized inverse of matrix $A$.
Why they have taken different stopping criteria? I need help to understand this. I would be very much thankful.