Added quadratic cases for inv and div functions, reenable test code for same.