* Built-in functions
*/
-static ex f_beta(const exprseq &e) {return gamma(e[0])*gamma(e[1])/gamma(e[0]+e[1]);}
static ex f_denom(const exprseq &e) {return e[0].denom();}
static ex f_eval1(const exprseq &e) {return e[0].eval();}
static ex f_evalf1(const exprseq &e) {return e[0].evalf();}
static ex f_has(const exprseq &e)
{
- return e[0].has(e[1]) ? exONE() : exZERO();
+ return e[0].has(e[1]) ? ex(1) : ex(0);
}
static ex f_inverse(const exprseq &e)
static ex f_is(const exprseq &e)
{
CHECK_ARG(0, relational, is);
- return (bool)ex_to_relational(e[0]) ? exONE() : exZERO();
+ return (bool)ex_to_relational(e[0]) ? ex(1) : ex(0);
}
static ex f_lcoeff(const exprseq &e)
static ex f_series2(const exprseq &e)
{
CHECK_ARG(1, symbol, series);
- return e[0].series(ex_to_symbol(e[1]), exZERO());
+ return e[0].series(ex_to_symbol(e[1]), ex(0));
}
static ex f_series3(const exprseq &e)
};
static const fcn_init builtin_fcns[] = {
- {"beta", fcn_desc(f_beta, 2)},
{"charpoly", fcn_desc(f_charpoly, 2)},
{"coeff", fcn_desc(f_coeff, 3)},
{"collect", fcn_desc(f_collect, 2)},
}
// All registered GiNaC functions
+#ifndef NO_GINAC_NAMESPACE
void GiNaC::ginsh_get_ginac_functions(void)
+#else // ndef NO_GINAC_NAMESPACE
+void ginsh_get_ginac_functions(void)
+#endif // ndef NO_GINAC_NAMESPACE
{
vector<registered_function_info>::const_iterator i = function::registered_functions().begin(), end = function::registered_functions().end();
unsigned serial = 0;
if (l.op(i).nops() > j)
m.set(i, j, l.op(i).op(j));
else
- m.set(i, j, exZERO());
+ m.set(i, j, ex(0));
return m;
}
insert_fcn_help("atan", "inverse tangent function");
insert_fcn_help("atan2", "inverse tangent function with two arguments");
insert_fcn_help("atanh", "inverse hyperbolic tangent function");
+ insert_fcn_help("beta", "beta function");
insert_fcn_help("cos", "cosine function");
insert_fcn_help("cosh", "hyperbolic cosine function");
+ insert_fcn_help("psi", "polygamma function");
insert_fcn_help("sin", "sine function");
insert_fcn_help("sinh", "hyperbolic sine function");
insert_fcn_help("tan", "tangent function");