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. 9
      src/storm/utility/constants.cpp

9
src/storm/utility/constants.cpp

@ -518,7 +518,7 @@ namespace storm {
}
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.");
return RationalFunction(carl::rationalize<RationalFunctionCoefficient>(static_cast<carl::sint>(number)));
}
@ -530,11 +530,12 @@ namespace storm {
}
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
#if defined(STORM_HAVE_GMP)
template<>
RationalFunction convertNumber(GmpRationalNumber const& number) {

Loading…
Cancel
Save