]> www.ginac.de Git - ginac.git/blobdiff - ginac/power.cpp
- prepared for 1.0.13 release
[ginac.git] / ginac / power.cpp
index 32473bd4c964677f599364300f9c335e776130a9..0730e3c8bf7fc385c5d4d1c1a97b6c565997cfab 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's symbolic exponentiation (basis^exponent). */
 
 /*
- *  GiNaC Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2003 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
@@ -125,7 +125,7 @@ void power::print(const print_context & c, unsigned level) const
 
                // Integer powers of symbols are printed in a special, optimized way
                if (exponent.info(info_flags::integer)
-                && (is_exactly_a<symbol>(basis) || is_exactly_a<constant>(basis))) {
+                && (is_a<symbol>(basis) || is_a<constant>(basis))) {
                        int exp = ex_to<numeric>(exponent).to_int();
                        if (exp > 0)
                                c.s << '(';
@@ -172,7 +172,7 @@ void power::print(const print_context & c, unsigned level) const
 
                bool is_tex = is_a<print_latex>(c);
 
-               if (is_tex && is_a<numeric>(exponent) && ex_to<numeric>(exponent).is_negative()) {
+               if (is_tex && is_exactly_a<numeric>(exponent) && ex_to<numeric>(exponent).is_negative()) {
 
                        // Powers with negative numeric exponents are printed as fractions in TeX
                        c.s << "\\frac{1}{";