Pruning algorithm to compute the square root of the phylogenetic covariance matrix and its determinant.