Use double the precision to compute the matrix Vinv, then change to given
precision. Also fix a compiler warning and adjust profiling code.