]> www.ginac.de Git - ginac.git/commitdiff
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 2b43193ee484d1c56b4f22f47837a615473c9a9c..4cfd7e4a6949da20f6470d23e6753c356e4f57e9 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)
                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 {
                        else
                                c.s << dst;
                } else {