From af59d142d62340859128cf604ded4bb3f052033d Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Tue, 31 Aug 2010 13:07:59 +0000 Subject: [PATCH] simplify series expression of second derivative of arccos squared [[Imported from SVN: r6295]] --- 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 3283955f..f25332f6 100644 --- a/dune/gfe/unitvector.hh +++ b/dune/gfe/unitvector.hh @@ -27,7 +27,7 @@ class UnitVector static double secondDerivativeOfArcCosSquared(const double& x) { const double eps = 1e-12; if (x > 1-eps) { // regular expression is unstable, use the series expansion instead - return 1.0/6 - 17*(x-1)/60 + 1.0/2 - (x-1)/4; + return 2.0/3 - 8*(x-1)/15; } else if (x < -1+eps) { // The function is not differentiable DUNE_THROW(Dune::Exception, "arccos^2 is not differentiable at x==-1!"); } else -- GitLab