Fix mul::info(info_flags::nonnegative).
authorVladimir Kisil <kisilv@maths.leeds.ac.uk>
Wed, 22 Apr 2015 19:52:15 +0000 (21:52 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Wed, 22 Apr 2015 19:52:15 +0000 (21:52 +0200)
Due to an obvious Boolean inversion, this function call always
returned the wrong answer.

ginac/mul.cpp

index 24cd2fc..22133a7 100644 (file)
@@ -344,7 +344,7 @@ bool mul::info(unsigned inf) const
                                else
                                        return false;
                        }
-                       return (overall_coeff.info(info_flags::negative)? pos : !pos);
+                       return (overall_coeff.info(info_flags::negative)? !pos : pos);
                }
                case info_flags::posint:
                case info_flags::negint: {