]> www.ginac.de Git - ginac.git/commitdiff
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 24cd2fc4384e1e7f5cfbb04a4c030058daa9f111..22133a74c06fc72ab9ad2d1a5b30b5f31a9ecc8e 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: {