// absolute value
//////////
-static ex abs_evalf(ex const & x)
+static ex abs_evalf(const ex & x)
{
BEGIN_TYPECHECK
TYPECHECK(x,numeric)
return abs(ex_to_numeric(x));
}
-static ex abs_eval(ex const & x)
+static ex abs_eval(const ex & x)
{
if (is_ex_exactly_of_type(x, numeric))
return abs(ex_to_numeric(x));
// dilogarithm
//////////
-static ex Li2_eval(ex const & x)
+static ex Li2_eval(const ex & x)
{
if (x.is_zero())
return x;
// trilogarithm
//////////
-static ex Li3_eval(ex const & x)
+static ex Li3_eval(const ex & x)
{
if (x.is_zero())
return x;
// factorial
//////////
-static ex factorial_evalf(ex const & x)
+static ex factorial_evalf(const ex & x)
{
return factorial(x).hold();
}
-static ex factorial_eval(ex const & x)
+static ex factorial_eval(const ex & x)
{
if (is_ex_exactly_of_type(x, numeric))
return factorial(ex_to_numeric(x));
// binomial
//////////
-static ex binomial_evalf(ex const & x, ex const & y)
+static ex binomial_evalf(const ex & x, const ex & y)
{
return binomial(x, y).hold();
}
-static ex binomial_eval(ex const & x, ex const &y)
+static ex binomial_eval(const ex & x, const ex &y)
{
if (is_ex_exactly_of_type(x, numeric) && is_ex_exactly_of_type(y, numeric))
return binomial(ex_to_numeric(x), ex_to_numeric(y));
// Order term function (for truncated power series)
//////////
-static ex Order_eval(ex const & x)
+static ex Order_eval(const ex & x)
{
if (is_ex_exactly_of_type(x, numeric)) {
return Order(x).hold();
}
-static ex Order_series(ex const & x, symbol const & s, ex const & point, int order)
+static ex Order_series(const ex & x, const symbol & s, const ex & point, int order)
{
// Just wrap the function into a pseries object
epvector new_seq;
// Solve linear system
//////////
-ex lsolve(ex const &eqns, ex const &symbols)
+ex lsolve(const ex &eqns, const ex &symbols)
{
// solve a system of linear equations
if (eqns.info(info_flags::relation_equal)) {
matrix solution;
try {
solution=sys.fraction_free_elim(vars,rhs);
- } catch (runtime_error const & e) {
+ } catch (const runtime_error & e) {
// probably singular matrix (or other error)
// return empty solution list
// cerr << e.what() << endl;
}
/** non-commutative power. */
-ex ncpower(ex const &basis, unsigned exponent)
+ex ncpower(const ex &basis, unsigned exponent)
{
if (exponent==0) {
return _ex1();