Browse Source

use of intermediate value to make conversion work with gmp

tempestpy_adaptions
dehnert 8 years ago
committed by sjunges
parent
commit
4e1855a440
  1. 7
      src/storm/utility/constants.cpp

7
src/storm/utility/constants.cpp

@ -518,7 +518,7 @@ namespace storm {
} }
template<> template<>
RationalFunction convertNumber(int_fast64_t const& number){
RationalFunction convertNumber(int_fast64_t const& number) {
STORM_LOG_ASSERT(static_cast<carl::sint>(number) == number, "Rationalizing failed, because the number is too large."); STORM_LOG_ASSERT(static_cast<carl::sint>(number) == number, "Rationalizing failed, because the number is too large.");
return RationalFunction(carl::rationalize<RationalFunctionCoefficient>(static_cast<carl::sint>(number))); return RationalFunction(carl::rationalize<RationalFunctionCoefficient>(static_cast<carl::sint>(number)));
} }
@ -530,8 +530,9 @@ namespace storm {
} }
template<> template<>
ClnRationalNumber convertNumber(RationalFunction const& number){
return convertNumber<ClnRationalNumber>(number.nominatorAsNumber() / number.denominatorAsNumber());
ClnRationalNumber convertNumber(RationalFunction const& number) {
storm::RationalFunctionCoefficient tmp = number.nominatorAsNumber() / number.denominatorAsNumber();
return convertNumber<ClnRationalNumber>(tmp);
} }
#endif #endif

Loading…
Cancel
Save