From: Christian Bauer Date: Fri, 25 Oct 2002 18:17:47 +0000 (+0000) Subject: synced to 1.0 X-Git-Tag: release_1-1-0~60 X-Git-Url: https://www.ginac.de/ginac.git/tutorial/ginac.git?a=commitdiff_plain;h=3ced416a68d77aea2d4dc1a65e4ce54ff9e1a271;p=ginac.git synced to 1.0 --- diff --git a/ginac/numeric.cpp b/ginac/numeric.cpp index 02fc17bf..24835823 100644 --- a/ginac/numeric.cpp +++ b/ginac/numeric.cpp @@ -360,7 +360,12 @@ void numeric::print(const print_context & c, unsigned level) const c.s.precision(16); else c.s.precision(7); - if (this->is_rational() && !this->is_integer()) { + if (is_a(c) && this->is_integer()) { + c.s << "cln::cl_I(\""; + const cln::cl_R r = cln::realpart(cln::the(value)); + print_real_number(c,r); + c.s << "\")"; + } else if (this->is_rational() && !this->is_integer()) { if (compare(_num0) > 0) { c.s << "("; if (is_a(c)) @@ -382,7 +387,7 @@ void numeric::print(const print_context & c, unsigned level) const c.s << ")"; } else { if (is_a(c)) - c.s << "cln::cl_F(\"" << evalf() << "\")"; + c.s << "cln::cl_F(\"" << evalf() << "_" << Digits << "\")"; else c.s << to_double(); }