Can you factor out a small number, say 1e-6 or something? This will help the values in your matrix stay "large" (for certain values of large). You can re-factor in the 1e-6 after you have done your matrix calculations. Also, what are you doing with the matricies? If you are attempting to do anything even remotely large or complex(numerical analysis for instance), then matlab is your tool, not perl. Matlab is optimized to handle matricies. You want an LDU decomposition? BAM! It's there. Eigenvalues/eigenvectores? You got it. The list goes on.