### MC30 Sparse symmetric matrix: calculate scaling factors

This subroutine calculates scaling factors for a symmetric sparse matrix
$A={\left\{{a}_{ij}\right\}}_{n\times n}$. They
may be used, for instance, to scale the matrix prior to solving a corresponding set of
linear equations, and are chosen so that the scaled matrix has its entries
near to unity in the sense that the sum of the squares of the logarithms
of the entries is minimized. The natural logarithms of the scaling factors
${s}_{i}$,
$i=1,2,...,n$ for
the rows and columns are returned so that the scaled matrix has entries

${b}_{ij}={a}_{ij}exp\left({s}_{i}+{s}_{j}\right)$.