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
friend numeric asinh(numeric const & x);
friend numeric acosh(numeric const & x);
friend numeric atanh(numeric const & x);
+ friend numeric zeta(numeric const & x);
friend numeric bernoulli(numeric const & n);
friend numeric abs(numeric const & x);
friend numeric mod(numeric const & a, numeric const & b);
friend numeric isqrt(numeric const & x);
friend numeric gcd(numeric const & a, numeric const & b);
friend numeric lcm(numeric const & a, numeric const & b);
- friend numeric const & numZERO(void);
- friend numeric const & numONE(void);
- friend numeric const & numTWO(void);
- friend numeric const & numTHREE(void);
- friend numeric const & numMINUSONE(void);
- friend numeric const & numHALF(void);
// member functions
// functions overriding virtual functions from bases classes
public:
basic * duplicate() const;
+ void print(ostream & os, unsigned precedence=0) const;
void printraw(ostream & os) const;
void printtree(ostream & os, unsigned indent) const;
- void print(ostream & os, unsigned precedence=0) const;
void printcsrc(ostream & os, unsigned type, unsigned precedence=0) const;
bool info(unsigned inf) const;
ex evalf(int level=0) const;
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;
// global functions
-numeric const & numZERO(void);
-numeric const & numONE(void);
-numeric const & numTWO(void);
-numeric const & numMINUSONE(void);
-numeric const & numHALF(void);
-
numeric exp(numeric const & x);
numeric log(numeric const & x);
numeric sin(numeric const & x);
inline bool is_real(numeric const & x)
{ return x.is_real(); }
+inline bool is_cinteger(numeric const & x)
+{ return x.is_cinteger(); }
+
+inline bool is_crational(numeric const & x)
+{ return x.is_crational(); }
+
inline numeric real(numeric const & x)
{ return x.real(); }
inline numeric denom(numeric const & x)
{ return x.denom(); }
-ex IEvalf(void);
+// numeric evaluation functions for class constant objects:
+
ex PiEvalf(void);
ex EulerGammaEvalf(void);
ex CatalanEvalf(void);
// utility functions
inline const numeric &ex_to_numeric(const ex &e)
{
- return static_cast<const numeric &>(*e.bp);
+ return static_cast<const numeric &>(*e.bp);
}
+#ifndef NO_GINAC_NAMESPACE
} // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
#endif // ndef __GINAC_NUMERIC_H__