]> www.ginac.de Git - ginac.git/blobdiff - ginac/numeric.cpp
- architectural checkpoint for zeta-function.
[ginac.git] / ginac / numeric.cpp
index 165ce594c106e6fd66d69415202c9fb7339c9673..faffb6c5896a6fdadf1d7fd2c38cdea25a66dcf2 100644 (file)
@@ -1062,11 +1062,30 @@ 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.
- *  stub stub stub stub stub stub! */
+ *  This is only a stub! */
 numeric gamma(numeric const & x)
 {
-    clog << "gamma(): Nobody expects the Spanish inquisition" << endl;
+    clog << "gamma(): Does anybody know good way to calculate this numerically?" << endl;
+    return numeric(0);
+}
+
+/** The psi function (aka polygamma function).
+ *  This is only a stub! */
+numeric psi(numeric const & n, numeric const & x)
+{
+    clog << "psi(): Does anybody know good way to calculate this numerically?" << endl;
     return numeric(0);
 }