]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns_zeta.cpp
- Introduced exception do_taylor to signal Taylor expansion is ok for series
[ginac.git] / ginac / inifcns_zeta.cpp
index ae58ec1630cb103a6e2898ee0690386364e79294..e343b6fbe2692dc6c2eb92953309b65c0e2ec081 100644 (file)
@@ -30,7 +30,9 @@
 #include "power.h"
 #include "symbol.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // Riemann's Zeta-function
@@ -44,7 +46,7 @@ static ex zeta_eval(ex const & x)
         if (y.is_integer()) {
             if (y.is_zero())
                 return -exHALF();
-            if (!x.compare(exONE()))
+            if (x.is_equal(exONE()))
                 throw(std::domain_error("zeta(1): infinity"));
             if (x.info(info_flags::posint)) {
                 if (x.info(info_flags::odd))
@@ -71,18 +73,8 @@ static ex zeta_evalf(ex const & x)
     return zeta(ex_to_numeric(x));
 }
 
-static ex zeta_diff(ex const & x, unsigned diff_param)
-{
-    ASSERT(diff_param==0);
-    
-    return exZERO();  // should return zeta(numONE(),x);
-}
-
-static ex zeta_series(ex const & x, symbol const & s, ex const & point, int order)
-{
-    throw(std::logic_error("don't know the series expansion of the zeta function"));
-}
-
-REGISTER_FUNCTION(zeta, zeta_eval, zeta_evalf, zeta_diff, zeta_series);
+REGISTER_FUNCTION(zeta, zeta_eval, zeta_evalf, NULL, NULL);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE