]> www.ginac.de Git - ginac.git/blobdiff - ginac/numeric.h
- According to CLTL 0^I is undefined, 0^(I+epsilon) is 0 and 0^(I-epsilon)
[ginac.git] / ginac / numeric.h
index 332f7552b5c3efaf779087f255230532964e5584..95ba4419073d4b75b2d30e2b3bc3bc4176231883 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 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);
@@ -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;
-    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)
@@ -190,10 +188,10 @@ public:
     int to_int(void) const;
     long to_long(void) const;
     double to_double(void) const;
-    numeric real(void) const;
-    numeric imag(void) const;
-    numeric numer(void) const;
-    numeric denom(void) const;
+    const numeric real(void) const;
+    const numeric imag(void) const;
+    const numeric numer(void) const;
+    const numeric denom(void) const;
     int int_length(void) const;
 
 // member variables
@@ -210,9 +208,12 @@ extern const numeric I;
 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)
 
+// has been changed
+//#define is_a_numeric_hash(x) ((x)&0x80000000U)
+
 // global functions
 
 const numeric exp(const numeric & x);