Former-commit-id: 465d90b4a7
465d90b4a7
@ -330,6 +330,9 @@ namespace storm {
template<class T>
bool equalModuloPrecision(T const& val1, T const& val2, T precision, bool relativeError = true) {
if (relativeError) {
if (val2 == 0) {
return (std::abs(val1) <= precision);
}
if (std::abs(val1 - val2)/val2 > precision) return false;
} else {
if (std::abs(val1 - val2) > precision) return false;