Fix cl_N output of negative fixnums.
authorRichard Kreckel <kreckel@ginac.de>
Thu, 4 Apr 2019 18:21:41 +0000 (20:21 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Thu, 4 Apr 2019 18:21:41 +0000 (20:21 +0200)
Thanks to Feng Feng for reporting this.

ginac/numeric.cpp

index 2b43193..4cfd7e4 100644 (file)
@@ -506,7 +506,7 @@ static void print_real_cl_N(const print_context & c, const cln::cl_R & x)
                if (coerce(dst, cln::the<cln::cl_I>(x))) {
                        // can be converted to native int
                        if (dst < 0)
-                               c.s << "(-" << dst << ")";
+                               c.s << '(' << dst << ')';
                        else
                                c.s << dst;
                } else {