From 29a5838106ea5e2aa1e8143c511b70217a35b07b Mon Sep 17 00:00:00 2001
From: Ian Bell <ian.bell@nist.gov>
Date: Fri, 27 May 2022 10:01:59 -0400
Subject: [PATCH] Fix bug in coefficient for 1,4 centered finite deriv

---
 include/teqp/finite_derivs.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/teqp/finite_derivs.hpp b/include/teqp/finite_derivs.hpp
index 5f6e370..f95818d 100644
--- a/include/teqp/finite_derivs.hpp
+++ b/include/teqp/finite_derivs.hpp
@@ -32,7 +32,7 @@ auto centered_diff(const Function &f, const Scalar x, const Scalar h) {
 	using r = Scalar;
 	static std::map<std::tuple<int, int>, DiffCoeffs> CentralDiffCoeffs = {
 		{{1, 2}, {{-1,1},      {-r(1)/r(2), r(1)/r(2)}} },
-		{{1, 4}, {{-2,-1,1,2}, {r(1)/ r(1), -r(2)/r(3), r(2)/r(3), -r(1)/r(12)}} },
+		{{1, 4}, {{-2,-1,1,2}, {r(1)/ r(12), -r(2)/r(3), r(2)/r(3), -r(1)/r(12)}} },
 		{{1, 6}, {{-3,-2,-1,1,2,3}, {-r(1)/r(60), r(3)/r(20), -r(3)/r(4), r(3)/r(4), -r(3)/r(20), r(1)/r(60)}} },
 
 		{{2, 2}, {{-1,0,1}, {1, -2, 1} }},
-- 
GitLab