From a3ccde070f586971b4a65269645f119a7fe4b66d Mon Sep 17 00:00:00 2001 From: wolf Date: Sat, 20 Sep 2003 23:02:01 +0000 Subject: [PATCH] If there is no header, use old value for tolerance git-svn-id: https://svn.dealii.org/trunk@8001 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/source/quadrature_lib.cc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/deal.II/base/source/quadrature_lib.cc b/deal.II/base/source/quadrature_lib.cc index f4709f74b4..37b8c057fb 100644 --- a/deal.II/base/source/quadrature_lib.cc +++ b/deal.II/base/source/quadrature_lib.cc @@ -14,7 +14,10 @@ #include #include -#include + +#ifdef HAVE_STD_NUMERIC_LIMITS +# include +#endif // please note: for a given dimension, we need the quadrature formulae @@ -46,9 +49,21 @@ QGauss<1>::QGauss (const unsigned int n) // of the accuracy of double there, // while on other machines we'd // like to go further down +#ifdef HAVE_STD_NUMERIC_LIMITS const long double tolerance = std::max (static_cast(std::numeric_limits::epsilon() / 100), static_cast(std::numeric_limits::epsilon() * 5)); +#else + // well, if there is no + // header, then we can do not much + // better than just checking by + // hand that long double is not the + // same as double and set some + // values by hand + const long double tolerance + = (sizeof(long double) != sizeof(double) ? 1.e-19 : 5e-16); +#endif + for (unsigned int i=1; i<=m; ++i) { -- 2.39.5