]> www.ginac.de Git - ginac.git/commitdiff
Add "series_to_poly" to ginsh.
authorVitaly Magerya <vmagerya@gmail.com>
Sun, 6 Feb 2022 18:20:15 +0000 (19:20 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Sun, 6 Feb 2022 18:20:15 +0000 (19:20 +0100)
ginsh/ginsh_parser.ypp

index 4b82d32f7c73e85116a2ab955b2c3f11cead8f96..88d1ce787b12686597937c46c4a4fd5073e4b28d 100644 (file)
@@ -530,6 +530,12 @@ static ex f_series(const exprseq &e)
        return e[0].series(e[1], ex_to<numeric>(e[2]).to_int());
 }
 
+static ex f_series_to_poly(const exprseq &e)
+{
+       CHECK_ARG(0, pseries, series_to_poly);
+       return series_to_poly(ex_to<pseries>(e[0]));
+}
+
 static ex f_sprem(const exprseq &e)
 {
        return sprem(e[0], e[1], e[2]);
@@ -737,6 +743,7 @@ static const fcn_init builtin_fcns[] = {
        {"rem", f_rem, 3},
        {"resultant", f_resultant, 3},
        {"series", f_series, 3},
+       {"series_to_poly", f_series_to_poly, 1},
        {"sprem", f_sprem, 3},
        {"sqrfree", f_sqrfree1, 1},
        {"sqrfree", f_sqrfree2, 2},