Many algorithms recently proposed for discrete time adaptive control use a recursive least-squares type iteration. Typical examples are the modified least-squares and weighted least-squares algorithms. Numerical difficulties arrise with such algorithms when the covariance matrix is directly updated. The paper discusses the square-root and U-D factorization techniques applicable for the covariance matrix or its inverse. These techniques avoid the numerical problems encountered with direct implementation of the recursions. New versions of the factorisation algorithms are presented and analysied in the paper. Implementation details and recommendations for the usage of the newly developed mathematical routines to solve the related problems are given.