Compact Numerical Methods for Computers: Linear Algebra and Function Minimization