Working (partial) implementation of arnoldi in C