]> www.ginac.de Git - ginac.git/blobdiff - ginac/power.cpp
Products (class mul) now answer correctly to info_flags::negative and
[ginac.git] / ginac / power.cpp
index 999d9b147284f894f1e18298f6bd9a5465c2e9e8..4349ab7a59a47959d0d600607e7148dc13084a74 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's symbolic exponentiation (basis^exponent). */
 
 /*
- *  GiNaC Copyright (C) 1999-2009 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2010 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -240,6 +240,8 @@ bool power::info(unsigned inf) const
                               basis.info(inf);
                case info_flags::expanded:
                        return (flags & status_flags::expanded);
+               case info_flags::positive:
+                       return basis.info(info_flags::positive) && exponent.info(info_flags::real);
                case info_flags::has_indices: {
                        if (flags & status_flags::has_indices)
                                return true;