How do you calculate the maximum value of vin so that the amp is used below compression in a theoretical non-linear amplifier? How do you efficiently calculate the Moore-Penrose pseudoinverse of a square non-invertible matrix?