Simple implementation of a non-linear conjugate gradient optimization routine in c