]> www.ginac.de Git - ginac.git/blobdiff - check/exam_inifcns.cpp
- documented info_flags::algebraic.
[ginac.git] / check / exam_inifcns.cpp
index 16788c54d2c658f675d7172739b27e3952a6047e..823e25ecc46f01490195e16ef3ba45b7217b9206 100644 (file)
@@ -93,44 +93,44 @@ static unsigned inifcns_consist_trans(void)
     return result;
 }
 
-/* Simple tests on the Gamma function.  We stuff in arguments where the results
+/* Simple tests on the tgamma function.  We stuff in arguments where the results
  * exists in closed form and check if it's ok. */
 static unsigned inifcns_consist_gamma(void)
 {
     unsigned result = 0;
     ex e;
     
-    e = Gamma(ex(1));
+    e = tgamma(ex(1));
     for (int i=2; i<8; ++i)
-        e += Gamma(ex(i));
+        e += tgamma(ex(i));
     if (e != numeric(874)) {
-        clog << "Gamma(1)+...+Gamma(7) erroneously returned "
+        clog << "tgamma(1)+...+tgamma(7) erroneously returned "
              << e << " instead of 874" << endl;
         ++result;
     }
     
-    e = Gamma(ex(1));
+    e = tgamma(ex(1));
     for (int i=2; i<8; ++i)
-        e *= Gamma(ex(i));    
+        e *= tgamma(ex(i));    
     if (e != numeric(24883200)) {
-        clog << "Gamma(1)*...*Gamma(7) erroneously returned "
+        clog << "tgamma(1)*...*tgamma(7) erroneously returned "
              << e << " instead of 24883200" << endl;
         ++result;
     }
     
-    e = Gamma(ex(numeric(5, 2)))*Gamma(ex(numeric(9, 2)))*64;
+    e = tgamma(ex(numeric(5, 2)))*tgamma(ex(numeric(9, 2)))*64;
     if (e != 315*Pi) {
-        clog << "64*Gamma(5/2)*Gamma(9/2) erroneously returned "
+        clog << "64*tgamma(5/2)*tgamma(9/2) erroneously returned "
              << e << " instead of 315*Pi" << endl;
         ++result;
     }
     
-    e = Gamma(ex(numeric(-13, 2)));
+    e = tgamma(ex(numeric(-13, 2)));
     for (int i=-13; i<7; i=i+2)
-        e += Gamma(ex(numeric(i, 2)));
-    e = (e*Gamma(ex(numeric(15, 2)))*numeric(512));
+        e += tgamma(ex(numeric(i, 2)));
+    e = (e*tgamma(ex(numeric(15, 2)))*numeric(512));
     if (e != numeric(633935)*Pi) {
-        clog << "512*(Gamma(-13/2)+...+Gamma(5/2))*Gamma(15/2) erroneously returned "
+        clog << "512*(tgamma(-13/2)+...+tgamma(5/2))*tgamma(15/2) erroneously returned "
              << e << " instead of 633935*Pi" << endl;
         ++result;
     }
@@ -147,11 +147,11 @@ static unsigned inifcns_consist_psi(void)
     ex e, f;
     
     // We check psi(1) and psi(1/2) implicitly by calculating the curious
-    // little identity Gamma(1)'/Gamma(1) - Gamma(1/2)'/Gamma(1/2) == 2*log(2).
-    e += (Gamma(x).diff(x)/Gamma(x)).subs(x==numeric(1));
-    e -= (Gamma(x).diff(x)/Gamma(x)).subs(x==numeric(1,2));
+    // little identity tgamma(1)'/tgamma(1) - tgamma(1/2)'/tgamma(1/2) == 2*log(2).
+    e += (tgamma(x).diff(x)/tgamma(x)).subs(x==numeric(1));
+    e -= (tgamma(x).diff(x)/tgamma(x)).subs(x==numeric(1,2));
     if (e!=2*log(2)) {
-        clog << "Gamma(1)'/Gamma(1) - Gamma(1/2)'/Gamma(1/2) erroneously returned "
+        clog << "tgamma(1)'/tgamma(1) - tgamma(1/2)'/tgamma(1/2) erroneously returned "
              << e << " instead of 2*log(2)" << endl;
         ++result;
     }
@@ -198,7 +198,7 @@ unsigned exam_inifcns(void)
     result += inifcns_consist_gamma();  cout << '.' << flush;
     result += inifcns_consist_psi();  cout << '.' << flush;
     result += inifcns_consist_zeta();  cout << '.' << flush;
-
+    
     if (!result) {
         cout << " passed " << endl;
         clog << "(no output)" << endl;