]> www.ginac.de Git - ginac.git/blobdiff - ginac/numeric.h
- changed behaviour of numeric::is_rational() and added numeric::is_cinteger()
[ginac.git] / ginac / numeric.h
index 13c790fc6a754e2f939d8e4d6e2c47efc57fc1aa..168651d4a665b5e07662c91575565df177b3d69e 100644 (file)
@@ -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;
@@ -317,7 +321,8 @@ inline numeric numer(numeric const & x)
 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);
@@ -328,6 +333,8 @@ inline const numeric &ex_to_numeric(const ex &e)
        return static_cast<const numeric &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_NUMERIC_H__