]> www.ginac.de Git - ginac.git/blobdiff - ginac/numeric.h
- Fixed a logic error in numeric::info().
[ginac.git] / ginac / numeric.h
index 332f7552b5c3efaf779087f255230532964e5584..30091760507018a5943819d9a1e35253f9c3c32c 100644 (file)
@@ -83,6 +83,7 @@ class numeric : public basic
     friend const numeric atanh(const numeric & x);
     friend const numeric zeta(const numeric & x);
     friend const numeric bernoulli(const numeric & n);
     friend const numeric atanh(const numeric & x);
     friend const numeric zeta(const numeric & x);
     friend const numeric bernoulli(const numeric & n);
+    friend const numeric fibonacci(const numeric & n);
     friend numeric abs(const numeric & x);
     friend numeric mod(const numeric & a, const numeric & b);
     friend numeric smod(const numeric & a, const numeric & b);
     friend numeric abs(const numeric & x);
     friend numeric mod(const numeric & a, const numeric & b);
     friend numeric smod(const numeric & a, const numeric & b);
@@ -138,10 +139,7 @@ protected:
     ex derivative(const symbol & s) const;
     int compare_same_type(const basic & other) const;
     bool is_equal_same_type(const basic & other) const;
     ex derivative(const symbol & s) const;
     int compare_same_type(const basic & other) const;
     bool is_equal_same_type(const basic & other) const;
-    unsigned calchash(void) const {
-        hashvalue=HASHVALUE_NUMERIC;
-        return HASHVALUE_NUMERIC;
-    }
+    unsigned calchash(void) const;
 
     // new virtual functions which can be overridden by derived classes
     // (none)
 
     // new virtual functions which can be overridden by derived classes
     // (none)
@@ -210,9 +208,12 @@ extern const numeric I;
 extern const type_info & typeid_numeric;
 extern _numeric_digits Digits;
 
 extern const type_info & typeid_numeric;
 extern _numeric_digits Digits;
 
-#define is_a_numeric_hash(x) ((x)==HASHVALUE_NUMERIC)
+//#define is_a_numeric_hash(x) ((x)==HASHVALUE_NUMERIC)
 // may have to be changed to ((x)>=0x80000000U)
 
 // may have to be changed to ((x)>=0x80000000U)
 
+// has been changed
+//#define is_a_numeric_hash(x) ((x)&0x80000000U)
+
 // global functions
 
 const numeric exp(const numeric & x);
 // global functions
 
 const numeric exp(const numeric & x);