diff --git a/src/storm/models/sparse/Model.cpp b/src/storm/models/sparse/Model.cpp index 3f7774759..d75065299 100644 --- a/src/storm/models/sparse/Model.cpp +++ b/src/storm/models/sparse/Model.cpp @@ -6,6 +6,7 @@ #include "storm/utility/vector.h" #include "storm/adapters/CarlAdapter.h" +#include "storm/utility/NumberTraits.h" #include "storm/exceptions/IllegalArgumentException.h" #include "storm/exceptions/IllegalFunctionCallException.h" @@ -334,8 +335,7 @@ namespace storm { template bool Model::isExact() const { - // TODO: change when dedicated data-structure for exact values is present - return this->supportsParameters(); + return storm::NumberTraits::IsExact && storm::NumberTraits::IsExact; } template diff --git a/src/storm/utility/NumberTraits.h b/src/storm/utility/NumberTraits.h index bc39948ee..3d3d03387 100644 --- a/src/storm/utility/NumberTraits.h +++ b/src/storm/utility/NumberTraits.h @@ -1,13 +1,39 @@ #pragma once +#include "storm/adapters/CarlAdapter.h" + namespace storm { template struct NumberTraits { static const bool SupportsExponential = false; + static const bool IsExact = false; }; template<> struct NumberTraits { static const bool SupportsExponential = true; + static const bool IsExact = false; + }; + +#if defined(STORM_HAVE_CLN) + template<> + struct NumberTraits { + static const bool SupportsExponential = false; + static const bool IsExact = true; + }; +#endif + +#if defined(STORM_HAVE_GMP) + template<> + struct NumberTraits { + static const bool SupportsExponential = false; + static const bool IsExact = true; + }; +#endif + + template<> + struct NumberTraits { + static const bool SupportsExponential = false; + static const bool IsExact = true; }; }