Calculate the value of a quadratic form
quad_form(A, x)
Square n-by-n matrix
Vector of length n
Double value of the quadratic form x'Ax