Extract number of digits and matrix size to constants