From cde1973c7ccada699382cc05caaaa91055789279 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Thu, 21 Apr 2011 10:33:03 +0000
Subject: [PATCH] Bugfix: Grassia's sign bug in the power series of the sinc
 function was here, too

[[Imported from SVN: r7195]]
---
 dune/gfe/unitvector.hh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dune/gfe/unitvector.hh b/dune/gfe/unitvector.hh
index dedc20d1..de6df3f9 100644
--- a/dune/gfe/unitvector.hh
+++ b/dune/gfe/unitvector.hh
@@ -15,7 +15,7 @@ class UnitVector
 {
     /** \brief Computes sin(x/2) / x without getting unstable for small x */
     static double sinc(const double& x) {
-        return (x < 1e-4) ? 1 + (x*x/6) : std::sin(x)/x;
+        return (x < 1e-4) ? 1 - (x*x/6) : std::sin(x)/x;
     }
 
     /** \brief Compute the derivative of arccos^2 without getting unstable for x close to 1 */
-- 
GitLab