Set precision of the ostringstream

This commit is contained in:
Andreas Fabri 2022-01-24 12:44:39 +00:00
parent c678afe28d
commit 58c466e113
1 changed files with 1 additions and 0 deletions

View File

@ -291,6 +291,7 @@ void io() {
// successful re-reading of output
POLY p(NT(-3), NT(5), NT(0), NT(0), NT(-7), NT(9)), q;
std::ostringstream os;
os.precision(17);
os << p;
std::istringstream is(os.str());
is >> q;