]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns_nstdsums.cpp
numeric.cpp, archive.cpp: don't include config.h
[ginac.git] / ginac / inifcns_nstdsums.cpp
index f040e8ad64df2aab86a5d8dda2d3b9c51c3e8b3d..474ed3e233b79adcd94235fd09ca703d902dc7b6 100644 (file)
@@ -47,7 +47,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2019 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2020 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
@@ -3223,7 +3223,6 @@ static ex H_evalf(const ex& x1, const ex& x2)
                        return filter(H(x1, xtemp).hold()).subs(xtemp==x2).evalf();
                }
                // ... and expand parameter notation
-               bool has_minus_one = false;
                lst m;
                for (const auto & it : morg) {
                        if (it > 1) {
@@ -3236,7 +3235,6 @@ static ex H_evalf(const ex& x1, const ex& x2)
                                        m.append(0);
                                }
                                m.append(-1);
-                               has_minus_one = true;
                        } else {
                                m.append(it);
                        }
@@ -3297,7 +3295,14 @@ static ex H_evalf(const ex& x1, const ex& x2)
                        }
                        return res.subs(xtemp == numeric(x)).evalf();
                }
-               
+
+               // check for letters (-1)
+               bool has_minus_one = false;
+               for (const auto & it : m) {
+                       if (it == -1)
+                               has_minus_one = true;
+               }
+
                // check transformations for 0.95 <= |x| < 2.0
                
                // |(1-x)/(1+x)| < 0.9 -> circular area with center=9.53+0i and radius=9.47
@@ -4061,7 +4066,8 @@ static ex zeta2_evalf(const ex& x, const ex& s)
                return numeric(zeta_do_Hoelder_convolution(xi, si));
        }
 
-       return zeta(x, s).hold();
+       // x and s are not lists: convert to lists
+       return zeta(lst{x}, lst{s}).evalf();
 }