]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use portable version of erfc(). 2862/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 25 Jul 2016 17:57:07 +0000 (12:57 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 25 Jul 2016 17:57:07 +0000 (12:57 -0500)
erfc is only part of C99, and thus not in C++98. It did make it into C++ via the TR1
addition, which I think is in C++03 and consequently in C++11, but be that as it may,
let's just use the BOOST version of it to be on the safe side.

source/base/function_parser.cc

index e00dddadf8f41c7dfaaf4707f111865388c9eeea..87b58ae575c358b4fb99a6f4a6dc1edeb84cb220 100644 (file)
@@ -23,6 +23,7 @@
 
 DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
 #include <boost/random.hpp>
+#include <boost/math/special_functions/erf.hpp>
 DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
 
 #ifdef DEAL_II_WITH_MUPARSER
@@ -182,7 +183,7 @@ namespace internal
 
   double mu_erfc(double value)
   {
-    return erfc(value);
+    return boost::math::erfc(value);
   }
 
   // returns a random value in the range [0,1] initializing the generator

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.