Browse Source

not logging exceeding precision in Kwek-Mehlhorn

tempestpy_adaptions
dehnert 7 years ago
parent
commit
8f95032d34
  1. 4
      src/storm/utility/KwekMehlhorn.cpp

4
src/storm/utility/KwekMehlhorn.cpp

@ -38,7 +38,9 @@ namespace storm {
template<typename RationalType>
std::pair<typename NumberTraits<RationalType>::IntegerType, typename NumberTraits<RationalType>::IntegerType> truncateToRational(double const& value, uint64_t precision) {
STORM_LOG_THROW(precision < 17, storm::exceptions::PrecisionExceededException, "Exceeded precision of double, consider switching to rational numbers.");
if (precision >= 18) {
throw storm::exceptions::PrecisionExceededException() << "Exceeded precision of double, consider switching to rational numbers.";
}
double powerOfTen = std::pow(10, precision);
double truncated = storm::utility::trunc<double>(value * powerOfTen);

Loading…
Cancel
Save