]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns_trans.cpp
[bugfix] log_series: avoid infinite recursion
[ginac.git] / ginac / inifcns_trans.cpp
index c5551f75a2e77e4c247914d4cd531df458b7b1c9..682a981b772f3bda2854bf187698980b995a7084 100644 (file)
@@ -204,6 +204,10 @@ static ex log_series(const ex &arg,
        if (arg_pt.is_zero())
                must_expand_arg = true;
        
        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
        if (must_expand_arg) {
                // method:
                // This is the branch point: Series expand the argument first, then