From c91c98f2de322d9625c13eadbd97699484a31065 Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Thu, 23 Apr 2020 11:56:55 +0200 Subject: [PATCH] Pomdp: Fixing result output with exact numbers --- src/storm-pomdp-cli/storm-pomdp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/storm-pomdp-cli/storm-pomdp.cpp b/src/storm-pomdp-cli/storm-pomdp.cpp index b215b730f..2aa7b659a 100644 --- a/src/storm-pomdp-cli/storm-pomdp.cpp +++ b/src/storm-pomdp-cli/storm-pomdp.cpp @@ -103,7 +103,9 @@ namespace storm { } if (storm::NumberTraits::IsExact) { STORM_PRINT_AND_LOG(" (approx. "); - printResult(storm::utility::convertNumber(lowerBound), storm::utility::convertNumber(upperBound)); + double roundedLowerBound = storm::utility::isInfinity(-lowerBound) ? -storm::utility::infinity() : storm::utility::convertNumber(lowerBound); + double roundedUpperBound = storm::utility::isInfinity(upperBound) ? storm::utility::infinity() : storm::utility::convertNumber(upperBound); + printResult(roundedLowerBound, roundedUpperBound); STORM_PRINT_AND_LOG(")"); } }