From 97b322c669eebb3e67620f9aee48fc5076385d6c Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Tue, 1 Jan 2013 17:30:17 +0000
Subject: [PATCH] bugfix: only use series expansion close to 1

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

diff --git a/dune/gfe/hyperbolichalfspacepoint.hh b/dune/gfe/hyperbolichalfspacepoint.hh
index 04baba2c..c4b4ae1d 100644
--- a/dune/gfe/hyperbolichalfspacepoint.hh
+++ b/dune/gfe/hyperbolichalfspacepoint.hh
@@ -37,7 +37,7 @@ class HyperbolicHalfspacePoint
     /** \brief Compute the derivative of arccosh^2 without getting unstable for x close to 1 */
     static T derivativeOfArcCosHSquared(const T& x) {
         const T eps = 1e-4;
-        if (x > 1-eps) {  // regular expression is unstable, use the series expansion instead
+        if (x < 1+eps) {  // regular expression is unstable, use the series expansion instead
             return 2 - 2*(x-1)/3 + 4/15*(x-1)*(x-1);
         } else
             return 2*std::acosh(x) / std::sqrt(x*x-1);
-- 
GitLab