X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fnumeric.h;h=168651d4a665b5e07662c91575565df177b3d69e;hp=b1f4871805b5d02d7f4d64dec61dc51d4d933e1a;hb=b0265215a51a081d20fe68475e080716afc2d45a;hpb=68a7044bf956a75b6bd70aefa21ffe358e648e19;ds=sidebyside diff --git a/ginac/numeric.h b/ginac/numeric.h index b1f48718..168651d4 100644 --- a/ginac/numeric.h +++ b/ginac/numeric.h @@ -30,7 +30,9 @@ class cl_N; // We want to include cln.h only in numeric.cpp in order to // avoid namespace pollution and keep compile-time low. +#ifndef NO_GINAC_NAMESPACE namespace GiNaC { +#endif // ndef NO_GINAC_NAMESPACE #define HASHVALUE_NUMERIC 0x80000001U @@ -185,6 +187,8 @@ public: bool is_prime(void) const; bool is_rational(void) const; bool is_real(void) const; + bool is_cinteger(void) const; + bool is_crational(void) const; bool operator==(numeric const & other) const; bool operator!=(numeric const & other) const; bool operator<(numeric const & other) const; @@ -241,6 +245,7 @@ numeric acosh(numeric const & x); numeric atanh(numeric const & x); numeric zeta(numeric const & x); numeric gamma(numeric const & x); +numeric psi(numeric const & x); numeric psi(numeric const & n, numeric const & x); numeric factorial(numeric const & n); numeric doublefactorial(numeric const & n); @@ -316,15 +321,8 @@ inline numeric numer(numeric const & x) inline numeric denom(numeric const & x) { return x.denom(); } -/* do we need this any more? */ -//inline numeric factorial(int n) -//{ return factorial(numeric(n)); } +// numeric evaluation functions for class constant objects: -/* do we need this any more? */ -//inline numeric binomial(int n, int k) -//{ return binomial(numeric(n), numeric(k)); } - -ex IEvalf(void); ex PiEvalf(void); ex EulerGammaEvalf(void); ex CatalanEvalf(void); @@ -335,6 +333,8 @@ inline const numeric &ex_to_numeric(const ex &e) return static_cast(*e.bp); } +#ifndef NO_GINAC_NAMESPACE } // namespace GiNaC +#endif // ndef NO_GINAC_NAMESPACE #endif // ndef __GINAC_NUMERIC_H__