Browse Source

Increased precision of parsing of floating point numbers

tempestpy_adaptions
TimQu 6 years ago
parent
commit
6dec8ca659
  1. 4
      src/storm-parsers/parser/JaniParser.cpp

4
src/storm-parsers/parser/JaniParser.cpp

@ -1004,9 +1004,7 @@ namespace storm {
} else if (expressionStructure.is_number_integer()) { } else if (expressionStructure.is_number_integer()) {
return expressionManager->integer(expressionStructure.get<int64_t>()); return expressionManager->integer(expressionStructure.get<int64_t>());
} else if (expressionStructure.is_number_float()) { } else if (expressionStructure.is_number_float()) {
// For now, just take the double.
// TODO make this a rational number
return expressionManager->rational(expressionStructure.get<double>());
return expressionManager->rational(storm::utility::convertNumber<storm::RationalNumber>(expressionStructure.dump()));
} else if (expressionStructure.is_string()) { } else if (expressionStructure.is_string()) {
std::string ident = expressionStructure.get<std::string>(); std::string ident = expressionStructure.get<std::string>();
return storm::expressions::Expression(getVariableOrConstantExpression(ident, scope, auxiliaryVariables)); return storm::expressions::Expression(getVariableOrConstantExpression(ident, scope, auxiliaryVariables));

Loading…
Cancel
Save