computes the QR decomposition using modified Gram-Schmidt
with reorthogonalization
z is a vector that counts the reorthogonalization
steps per column (source Ritzit)
A (m x n), if m>=n:
* Q (m x n) orthornormal (.tr.Q.Q=I)
* R (n x n) upper triangular with nonnegative diagonal elements
Algorithms for the QR-Decomposition (Walter Gander)