num_deriv: extended analysis, first steps towards supporting general output