]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns_trans.cpp
Make power::expand() (x*p)^c -> x^c * p^c, if p>0.
[ginac.git] / ginac / inifcns_trans.cpp
index c5551f75a2e77e4c247914d4cd531df458b7b1c9..79d23ed47a9a4328310cf3ddc5829603115a825a 100644 (file)
@@ -4,7 +4,7 @@
  *  functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2015 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
@@ -204,6 +204,10 @@ static ex log_series(const ex &arg,
        if (arg_pt.is_zero())
                must_expand_arg = true;
        
+       if (arg.diff(ex_to<symbol>(rel.lhs())).is_zero()) {
+               throw do_taylor();
+       }
+
        if (must_expand_arg) {
                // method:
                // This is the branch point: Series expand the argument first, then