Skip to content

Commit

Permalink
fix #7523
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Jan 22, 2025
1 parent 4fce314 commit ef275ab
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/api/api_numeral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,7 @@ extern "C" {
}
}
else if (mk_c(c)->fpautil().is_numeral(to_expr(a), tmp)) {
std::ostringstream buffer;
fu.fm().display_smt2(buffer, tmp, false);
return mk_c(c)->mk_external_string(std::move(buffer).str());
return mk_c(c)->mk_external_string(fu.fm().to_rational_string(tmp));
}
else {
SET_ERROR_CODE(Z3_INVALID_ARG, nullptr);
Expand Down

0 comments on commit ef275ab

Please sign in to comment.