* power::info(): Unpolynomialize sin(x)^2 (by Chris Dams).
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Fri, 24 Sep 2004 01:46:19 +0000 (01:46 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Fri, 24 Sep 2004 01:46:19 +0000 (01:46 +0000)
ginac/power.cpp

index 309d529..f2c3731 100644 (file)
@@ -222,12 +222,14 @@ bool power::info(unsigned inf) const
                case info_flags::cinteger_polynomial:
                case info_flags::rational_polynomial:
                case info_flags::crational_polynomial:
-                       return exponent.info(info_flags::nonnegint);
+                       return exponent.info(info_flags::nonnegint) &&
+                              basis.info(inf);
                case info_flags::rational_function:
-                       return exponent.info(info_flags::integer);
+                       return exponent.info(info_flags::integer) &&
+                              basis.info(inf);
                case info_flags::algebraic:
-                       return (!exponent.info(info_flags::integer) ||
-                                       basis.info(inf));
+                       return !exponent.info(info_flags::integer) ||
+                              basis.info(inf);
        }
        return inherited::info(inf);
 }