* Makes the interface to the underlying bignum package available. */
/*
- * GiNaC Copyright (C) 1999-2005 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
public:
unsigned precedence() const {return 30;}
bool info(unsigned inf) const;
+ bool is_polynomial(const ex & var) const;
int degree(const ex & s) const;
int ldegree(const ex & s) const;
ex coeff(const ex & s, int n = 1) const;
- bool has(const ex &other) const;
+ bool has(const ex &other, unsigned options = 0) const;
ex eval(int level = 0) const;
ex evalf(int level = 0) const;
ex subs(const exmap & m, unsigned options = 0) const { return subs_one_level(m, options); } // overwrites basic::subs() for performance reasons
ex smod(const numeric &xi) const;
numeric max_coefficient() const;
ex conjugate() const;
+ ex real_part() const;
+ ex imag_part() const;
protected:
/** Implementation of ex::diff for a numeric always returns 0.
* @see ex::diff */
const numeric & operator=(double d);
const numeric & operator=(const char *s);
const numeric inverse() const;
+ numeric step() const;
int csgn() const;
int compare(const numeric &other) const;
bool is_equal(const numeric &other) const;
inline const numeric inverse(const numeric &x)
{ return x.inverse(); }
+inline numeric step(const numeric &x)
+{ return x.step(); }
+
inline int csgn(const numeric &x)
{ return x.csgn(); }
inline bool is_positive(const numeric &x)
{ return x.is_positive(); }
+inline bool is_negative(const numeric &x)
+{ return x.is_negative(); }
+
inline bool is_integer(const numeric &x)
{ return x.is_integer(); }
ex CatalanEvalf();
-// utility functions
-
-/** Specialization of is_exactly_a<numeric>(obj) for numeric objects. */
-template<> inline bool is_exactly_a<numeric>(const basic & obj)
-{
- return obj.tinfo()==TINFO_numeric;
-}
-
} // namespace GiNaC
#ifdef __MAKECINT__