From 8f95032d341d8ed78b8c9ee7eeede7fc17a08366 Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 13 Oct 2017 09:20:25 +0200 Subject: [PATCH] not logging exceeding precision in Kwek-Mehlhorn --- src/storm/utility/KwekMehlhorn.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/storm/utility/KwekMehlhorn.cpp b/src/storm/utility/KwekMehlhorn.cpp index 9c76be068..367c9a595 100644 --- a/src/storm/utility/KwekMehlhorn.cpp +++ b/src/storm/utility/KwekMehlhorn.cpp @@ -38,7 +38,9 @@ namespace storm { template std::pair::IntegerType, typename NumberTraits::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(value * powerOfTen);