From e7b658717077ce2508ad52bda67723ab8308a6b0 Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 21 Sep 2017 19:01:02 +0200 Subject: [PATCH] minor fixes for new relative convergence test --- src/storm/utility/constants.cpp | 2 +- src/storm/utility/vector.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storm/utility/constants.cpp b/src/storm/utility/constants.cpp index 2b05ed4e4..c423df21f 100644 --- a/src/storm/utility/constants.cpp +++ b/src/storm/utility/constants.cpp @@ -41,7 +41,7 @@ namespace storm { } bool isAlmostZero(double const& a) { - return a < 1e-15; + return a < 1e-12 && a > -1e-12; } template diff --git a/src/storm/utility/vector.h b/src/storm/utility/vector.h index 028e3360c..17a9d1295 100644 --- a/src/storm/utility/vector.h +++ b/src/storm/utility/vector.h @@ -808,7 +808,7 @@ namespace storm { // Specializiation for double as the relative check for doubles very close to zero is not meaningful. template<> - bool equalModuloPrecision(double const& val1, double const& val2, double const& precision, bool relativeError) { + inline bool equalModuloPrecision(double const& val1, double const& val2, double const& precision, bool relativeError) { if (relativeError) { if (storm::utility::isAlmostZero(val2)) { return storm::utility::isAlmostZero(val1);