Added caching to SingleVarFunction and 3-point methods to numerical differentiation