diff options
author | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2010-07-27 16:43:48 +0000 |
---|---|---|
committer | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2010-07-27 16:43:48 +0000 |
commit | 16b94d08ac1196823d7e3daf787b85813ba33e6e (patch) | |
tree | fad01a7f9ec6822be089e5219a9e2346fd2b55ea /math | |
parent | 0626a3d151445530e30869fdb0081340ddb1569d (diff) | |
download | opt-utilities-16b94d08ac1196823d7e3daf787b85813ba33e6e.tar.bz2 |
git-svn-id: file:///home/svn/opt_utilities@131 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'math')
-rw-r--r-- | math/num_diff.hpp | 3 |
1 files changed, 1 insertions, 2 deletions
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<rT>::epsilon()); rT result; - pT p_tmp; typename element_type_trait<pT>::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; |