ginsh_parser.ypp (ginac-1.7.11.tar.bz2) | : | ginsh_parser.ypp (ginac-1.8.0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 573 | skipping to change at line 573 | |||
if (i != assigned_symbol_table.end()) | if (i != assigned_symbol_table.end()) | |||
assigned_symbol_table.erase(i); | assigned_symbol_table.erase(i); | |||
return e[0]; | return e[0]; | |||
} | } | |||
static ex f_unit(const exprseq &e) | static ex f_unit(const exprseq &e) | |||
{ | { | |||
return e[0].unit(e[1]); | return e[0].unit(e[1]); | |||
} | } | |||
static ex f_basic_log_kernel(const exprseq &e) | ||||
{ | ||||
return basic_log_kernel(); | ||||
} | ||||
static ex f_multiple_polylog_kernel(const exprseq &e) | ||||
{ | ||||
return multiple_polylog_kernel(e[0]); | ||||
} | ||||
static ex f_ELi_kernel(const exprseq &e) | ||||
{ | ||||
return ELi_kernel(e[0],e[1],e[2],e[3]); | ||||
} | ||||
static ex f_Ebar_kernel(const exprseq &e) | ||||
{ | ||||
return Ebar_kernel(e[0],e[1],e[2],e[3]); | ||||
} | ||||
static ex f_Kronecker_dtau_kernel_4(const exprseq &e) | ||||
{ | ||||
return Kronecker_dtau_kernel(e[0],e[1],e[2],e[3]); | ||||
} | ||||
static ex f_Kronecker_dtau_kernel_3(const exprseq &e) | ||||
{ | ||||
return Kronecker_dtau_kernel(e[0],e[1],e[2]); | ||||
} | ||||
static ex f_Kronecker_dtau_kernel_2(const exprseq &e) | ||||
{ | ||||
return Kronecker_dtau_kernel(e[0],e[1]); | ||||
} | ||||
static ex f_Kronecker_dz_kernel_5(const exprseq &e) | ||||
{ | ||||
return Kronecker_dz_kernel(e[0],e[1],e[2],e[3],e[4]); | ||||
} | ||||
static ex f_Kronecker_dz_kernel_4(const exprseq &e) | ||||
{ | ||||
return Kronecker_dz_kernel(e[0],e[1],e[2],e[3]); | ||||
} | ||||
static ex f_Kronecker_dz_kernel_3(const exprseq &e) | ||||
{ | ||||
return Kronecker_dz_kernel(e[0],e[1],e[2]); | ||||
} | ||||
static ex f_Eisenstein_kernel_6(const exprseq &e) | ||||
{ | ||||
return Eisenstein_kernel(e[0],e[1],e[2],e[3],e[4],e[5]); | ||||
} | ||||
static ex f_Eisenstein_kernel_5(const exprseq &e) | ||||
{ | ||||
return Eisenstein_kernel(e[0],e[1],e[2],e[3],e[4]); | ||||
} | ||||
static ex f_Eisenstein_h_kernel_5(const exprseq &e) | ||||
{ | ||||
return Eisenstein_h_kernel(e[0],e[1],e[2],e[3],e[4]); | ||||
} | ||||
static ex f_Eisenstein_h_kernel_4(const exprseq &e) | ||||
{ | ||||
return Eisenstein_h_kernel(e[0],e[1],e[2],e[3]); | ||||
} | ||||
static ex f_modular_form_kernel_3(const exprseq &e) | ||||
{ | ||||
return modular_form_kernel(e[0],e[1],e[2]); | ||||
} | ||||
static ex f_modular_form_kernel_2(const exprseq &e) | ||||
{ | ||||
return modular_form_kernel(e[0],e[1]); | ||||
} | ||||
static ex f_user_defined_kernel(const exprseq &e) | ||||
{ | ||||
return user_defined_kernel(e[0],e[1]); | ||||
} | ||||
static ex f_q_expansion_modular_form(const exprseq &e) | ||||
{ | ||||
if ( is_a<Eisenstein_kernel>(e[0]) ) { | ||||
return ex_to<Eisenstein_kernel>(e[0]).q_expansion_modular_form(e[ | ||||
1], ex_to<numeric>(e[2]).to_int()); | ||||
} | ||||
if ( is_a<Eisenstein_h_kernel>(e[0]) ) { | ||||
return ex_to<Eisenstein_h_kernel>(e[0]).q_expansion_modular_form( | ||||
e[1], ex_to<numeric>(e[2]).to_int()); | ||||
} | ||||
if ( is_a<modular_form_kernel>(e[0]) ) { | ||||
return ex_to<modular_form_kernel>(e[0]).q_expansion_modular_form( | ||||
e[1], ex_to<numeric>(e[2]).to_int()); | ||||
} | ||||
throw(std::invalid_argument("first argument must be a modular form")); | ||||
} | ||||
static ex f_dummy(const exprseq &e) | static ex f_dummy(const exprseq &e) | |||
{ | { | |||
throw(std::logic_error("dummy function called (shouldn't happen)")); | throw(std::logic_error("dummy function called (shouldn't happen)")); | |||
} | } | |||
// Tables for initializing the "fcns" map and the function help topics | // Tables for initializing the "fcns" map and the function help topics | |||
struct fcn_init { | struct fcn_init { | |||
const char *name; | const char *name; | |||
fcnp p; | fcnp p; | |||
int num_params; | int num_params; | |||
skipping to change at line 649 | skipping to change at line 748 | |||
{"sqrfree", f_sqrfree2, 2}, | {"sqrfree", f_sqrfree2, 2}, | |||
{"sqrt", f_sqrt, 1}, | {"sqrt", f_sqrt, 1}, | |||
{"subs", f_subs2, 2}, | {"subs", f_subs2, 2}, | |||
{"subs", f_subs3, 3}, | {"subs", f_subs3, 3}, | |||
{"tcoeff", f_tcoeff, 2}, | {"tcoeff", f_tcoeff, 2}, | |||
{"time", f_dummy, 0}, // for Tab-completion | {"time", f_dummy, 0}, // for Tab-completion | |||
{"trace", f_trace, 1}, | {"trace", f_trace, 1}, | |||
{"transpose", f_transpose, 1}, | {"transpose", f_transpose, 1}, | |||
{"unassign", f_unassign, 1}, | {"unassign", f_unassign, 1}, | |||
{"unit", f_unit, 2}, | {"unit", f_unit, 2}, | |||
{"basic_log_kernel", f_basic_log_kernel, 0}, | ||||
{"multiple_polylog_kernel", f_multiple_polylog_kernel, 1}, | ||||
{"ELi_kernel", f_ELi_kernel, 4}, | ||||
{"Ebar_kernel", f_Ebar_kernel, 4}, | ||||
{"Kronecker_dtau_kernel", f_Kronecker_dtau_kernel_4, 4}, | ||||
{"Kronecker_dtau_kernel", f_Kronecker_dtau_kernel_3, 3}, | ||||
{"Kronecker_dtau_kernel", f_Kronecker_dtau_kernel_2, 2}, | ||||
{"Kronecker_dz_kernel", f_Kronecker_dz_kernel_5, 5}, | ||||
{"Kronecker_dz_kernel", f_Kronecker_dz_kernel_4, 4}, | ||||
{"Kronecker_dz_kernel", f_Kronecker_dz_kernel_3, 3}, | ||||
{"Eisenstein_kernel", f_Eisenstein_kernel_6, 6}, | ||||
{"Eisenstein_kernel", f_Eisenstein_kernel_5, 5}, | ||||
{"Eisenstein_h_kernel", f_Eisenstein_h_kernel_5, 5}, | ||||
{"Eisenstein_h_kernel", f_Eisenstein_h_kernel_4, 4}, | ||||
{"modular_form_kernel", f_modular_form_kernel_3, 3}, | ||||
{"modular_form_kernel", f_modular_form_kernel_2, 2}, | ||||
{"user_defined_kernel", f_user_defined_kernel, 2}, | ||||
{"q_expansion_modular_form", f_q_expansion_modular_form, 3}, | ||||
{nullptr, f_dummy, 0} // End marker | {nullptr, f_dummy, 0} // End marker | |||
}; | }; | |||
struct fcn_help_init { | struct fcn_help_init { | |||
const char *name; | const char *name; | |||
const char *help; | const char *help; | |||
}; | }; | |||
static const fcn_help_init builtin_help[] = { | static const fcn_help_init builtin_help[] = { | |||
{"acos", "inverse cosine function"}, | {"acos", "inverse cosine function"}, | |||
skipping to change at line 680 | skipping to change at line 797 | |||
{"factorial", "factorial function"}, | {"factorial", "factorial function"}, | |||
{"lgamma", "natural logarithm of Gamma function"}, | {"lgamma", "natural logarithm of Gamma function"}, | |||
{"tgamma", "Gamma function"}, | {"tgamma", "Gamma function"}, | |||
{"log", "natural logarithm"}, | {"log", "natural logarithm"}, | |||
{"psi", "psi function\npsi(x) is the digamma function, psi(n,x) the nth p olygamma function"}, | {"psi", "psi function\npsi(x) is the digamma function, psi(n,x) the nth p olygamma function"}, | |||
{"sin", "sine function"}, | {"sin", "sine function"}, | |||
{"sinh", "hyperbolic sine function"}, | {"sinh", "hyperbolic sine function"}, | |||
{"tan", "tangent function"}, | {"tan", "tangent function"}, | |||
{"tanh", "hyperbolic tangent function"}, | {"tanh", "hyperbolic tangent function"}, | |||
{"zeta", "zeta function\nzeta(x) is Riemann's zeta function, zetaderiv(n, x) its nth derivative.\nIf x is a GiNaC::lst, it is a multiple zeta value\nzeta( x,s) is an alternating Euler sum"}, | {"zeta", "zeta function\nzeta(x) is Riemann's zeta function, zetaderiv(n, x) its nth derivative.\nIf x is a GiNaC::lst, it is a multiple zeta value\nzeta( x,s) is an alternating Euler sum"}, | |||
{"G", "multiple polylogarithm (integral representation)"}, | ||||
{"Li2", "dilogarithm"}, | {"Li2", "dilogarithm"}, | |||
{"Li3", "trilogarithm"}, | {"Li3", "trilogarithm"}, | |||
{"Li", "(multiple) polylogarithm"}, | {"Li", "(multiple) polylogarithm"}, | |||
{"S", "Nielsen's generalized polylogarithm"}, | {"S", "Nielsen's generalized polylogarithm"}, | |||
{"H", "harmonic polylogarithm"}, | {"H", "harmonic polylogarithm"}, | |||
{"EllipticK", "complete elliptic integral of the first kind"}, | ||||
{"EllipticE", "complete elliptic integral of the second kind"}, | ||||
{"iterated_integral", "iterated integral"}, | ||||
{"Order", "order term function (for truncated power series)"}, | {"Order", "order term function (for truncated power series)"}, | |||
{"Derivative", "inert differential operator"}, | {"Derivative", "inert differential operator"}, | |||
{nullptr, nullptr} // End marker | {nullptr, nullptr} // End marker | |||
}; | }; | |||
#include "ginsh_extensions.h" | #include "ginsh_extensions.h" | |||
/* | /* | |||
* Add functions to ginsh | * Add functions to ginsh | |||
*/ | */ | |||
End of changes. 4 change blocks. | ||||
0 lines changed or deleted | 124 lines changed or added |