]> www.ginac.de Git - ginac.git/blobdiff - ginac/numeric.cpp
- architectural checkpoint for zeta-function.
[ginac.git] / ginac / numeric.cpp
index ef2784172107f22965381b271e2fafcd92d7bbca..faffb6c5896a6fdadf1d7fd2c38cdea25a66dcf2 100644 (file)
@@ -1062,6 +1062,17 @@ numeric atanh(numeric const & x)
     return ::atanh(*x.value);  // -> CLN
 }
 
+/** Numeric evaluation of Riemann's Zeta function.  Currently works only for
+ *  integer arguments. */
+numeric zeta(numeric const & x)
+{
+    if (x.is_integer())
+        return ::cl_zeta(x.to_int());  // -> CLN
+    else
+        clog << "zeta(): Does anybody know good way to calculate this numerically?" << endl;
+    return numeric(0);
+}
+
 /** The gamma function.
  *  This is only a stub! */
 numeric gamma(numeric const & x)