Browse Source

minor fixes for new relative convergence test

tempestpy_adaptions
dehnert 7 years ago
parent
commit
e7b6587170
  1. 2
      src/storm/utility/constants.cpp
  2. 2
      src/storm/utility/vector.h

2
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<typename ValueType>

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

Loading…
Cancel
Save