X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Fexam_inifcns.cpp;h=bdb5e7d7c9cfc60350eb41f855447d4dda3ae651;hp=16788c54d2c658f675d7172739b27e3952a6047e;hb=5b090bb7e4951b48a28c20ba21bf9810c86eb0ca;hpb=70ff026226b1a1a7530e8a1d934b98ad42795a1d diff --git a/check/exam_inifcns.cpp b/check/exam_inifcns.cpp index 16788c54..bdb5e7d7 100644 --- a/check/exam_inifcns.cpp +++ b/check/exam_inifcns.cpp @@ -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; }