From 16b94d08ac1196823d7e3daf787b85813ba33e6e Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Tue, 27 Jul 2010 16:43:48 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@131 ed2142bd-67ad-457f-ba7c-d818d4011675 --- math/num_diff.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'math') diff --git a/math/num_diff.hpp b/math/num_diff.hpp index 2d2e67d..6f07c27 100644 --- a/math/num_diff.hpp +++ b/math/num_diff.hpp @@ -38,7 +38,6 @@ namespace opt_utilities rT ep=std::sqrt(std::numeric_limits::epsilon()); rT result; - pT p_tmp; typename element_type_trait::element_type old_value=get_element(p,n); @@ -47,7 +46,7 @@ namespace opt_utilities set_element(p,n,old_value+h); rT v2=f(p); set_element(p,n,old_value-h); - rT v1=f(p_tmp); + rT v1=f(p); set_element(p,n,old_value); result=(v2-v1)/h/2; return result; -- cgit v1.2.2