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);