issue #22: generalization of the numerical method for multi-variable functions