Working (partial) implementation of Arnoldi in C