]> www.ginac.de Git - ginac.git/blobdiff - ginac/integration_kernel.cpp
Minor bug fix for the class modular_form_kernel: Ensure that the series-method includ...
[ginac.git] / ginac / integration_kernel.cpp
index 4372f5c3e794aeb682534680e7de1101af7de6b5..797301a22d358fd9f2e36c8ed61603faf0c966cd 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's integration kernels for iterated integrals. */
 
 /*
- *  GiNaC Copyright (C) 1999-2020 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2021 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
@@ -1963,6 +1963,8 @@ ex modular_form_kernel::series(const relational & r, int order, unsigned options
        subs_q_expansion do_subs_q_expansion(qbar, order);
 
        ex res = do_subs_q_expansion(P).series(qbar,order);
+       res += Order(pow(qbar,order));
+       res = res.series(qbar,order);
 
        return res;
 }
@@ -2012,12 +2014,12 @@ bool modular_form_kernel::is_numeric(void) const
        symbol qbar("qbar");
 
        // test with a random number and random expansion
-       return series_to_poly(P.series(qbar,18)).subs(qbar==numeric(1,937)).evalf().info(info_flags::numeric);
+       return series_to_poly(q_expansion_modular_form(qbar,18)).subs(qbar==numeric(1,937)).evalf().info(info_flags::numeric);
 }
 
 ex modular_form_kernel::Laurent_series(const ex & qbar, int order) const
 {
-       ex res = series_to_poly(P.series(qbar,order+1));
+       ex res = series_to_poly(q_expansion_modular_form(qbar,order+1));
        res = C_norm * res/qbar;
        res = res.series(qbar,order);
        return res;