From: Christian Bauer Date: Tue, 29 Oct 2002 18:59:19 +0000 (+0000) Subject: added the sprem() function X-Git-Tag: release_1-0-12~1 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=47512c1a9dba42e99570f617511db11dfcb176aa added the sprem() function --- diff --git a/ginsh/ginsh.1.in b/ginsh/ginsh.1.in index 9f797f57..e5202138 100644 --- a/ginsh/ginsh.1.in +++ b/ginsh/ginsh.1.in @@ -342,6 +342,9 @@ detail here. Please refer to the GiNaC documentation. .BI series( expression ", " relation-or-symbol ", " order ) \- series expansion .br +.BI sprem( expression ", " expression ", " symbol ) +\- sparse pseudo-remainder of polynomials +.br .BI sqrfree( "expression [" ", " symbol-list] ) \- square-free factorization of a polynomial .br diff --git a/ginsh/ginsh_parser.yy b/ginsh/ginsh_parser.yy index 7c7e548c..faaafcac 100644 --- a/ginsh/ginsh_parser.yy +++ b/ginsh/ginsh_parser.yy @@ -479,6 +479,12 @@ static ex f_series(const exprseq &e) return e[0].series(e[1], ex_to(e[2]).to_int()); } +static ex f_sprem(const exprseq &e) +{ + CHECK_ARG(2, symbol, sprem); + return sprem(e[0], e[1], ex_to(e[2])); +} + static ex f_sqrfree2(const exprseq &e) { CHECK_ARG(1, lst, sqrfree); @@ -571,6 +577,7 @@ static const fcn_init builtin_fcns[] = { {"quo", fcn_desc(f_quo, 3)}, {"rem", fcn_desc(f_rem, 3)}, {"series", fcn_desc(f_series, 3)}, + {"sprem", fcn_desc(f_sprem, 3)}, {"sqrfree", fcn_desc(f_sqrfree1, 1)}, {"sqrfree", fcn_desc(f_sqrfree2, 2)}, {"sqrt", fcn_desc(f_sqrt, 1)},