X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fnumeric.h;h=30091760507018a5943819d9a1e35253f9c3c32c;hp=332f7552b5c3efaf779087f255230532964e5584;hb=02a1c658c196cdf0090fdd134a9aeb884a671922;hpb=e9e758438ef2a1d90372415780c6a06386a84e8f diff --git a/ginac/numeric.h b/ginac/numeric.h index 332f7552..30091760 100644 --- a/ginac/numeric.h +++ b/ginac/numeric.h @@ -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) @@ -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);