I have a lot of rectangular matrices with dimension more than 500. And their determinants are very small, from 1e-5000 to 1e-1000. I need to compute log(det(A)). If I use log(det(A)) in MATLAB, it will create Inf because of underflow problem. Who knows how to avoid such a kind of problem in MATLAB?