X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Finifcns_gamma.cpp;h=57dbeb3dd312dc52384f20d78d42d71b10802594;hb=85ce9664ddba79c28a6945b1e5b4e2b71f77cb51;hp=e6ba5b1155f569e60073d8c50550f01c5e186fa0;hpb=703c6cebb5d3d395437e73e6935f3691aed68e0a;p=ginac.git diff --git a/ginac/inifcns_gamma.cpp b/ginac/inifcns_gamma.cpp index e6ba5b11..57dbeb3d 100644 --- a/ginac/inifcns_gamma.cpp +++ b/ginac/inifcns_gamma.cpp @@ -4,7 +4,7 @@ * some related stuff. */ /* - * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,7 +25,6 @@ #include #include "inifcns.h" -#include "ex.h" #include "constant.h" #include "pseries.h" #include "numeric.h" @@ -34,9 +33,7 @@ #include "symbol.h" #include "utils.h" -#ifndef NO_NAMESPACE_GINAC namespace GiNaC { -#endif // ndef NO_NAMESPACE_GINAC ////////// // Logarithm of Gamma function @@ -85,9 +82,9 @@ static ex lgamma_deriv(const ex & x, unsigned deriv_param) static ex lgamma_series(const ex & arg, - const relational & rel, - int order, - unsigned options) + const relational & rel, + int order, + unsigned options) { // method: // Taylor series where there is no pole falls back to psi function @@ -105,15 +102,14 @@ static ex lgamma_series(const ex & arg, ex recur; for (numeric p; p<=m; ++p) recur += log(arg+p); - cout << recur << endl; return (lgamma(arg+m+_ex1())-recur).series(rel, order, options); } REGISTER_FUNCTION(lgamma, eval_func(lgamma_eval). - evalf_func(lgamma_evalf). - derivative_func(lgamma_deriv). - series_func(lgamma_series)); + evalf_func(lgamma_evalf). + derivative_func(lgamma_deriv). + series_func(lgamma_series)); ////////// @@ -182,9 +178,9 @@ static ex tgamma_deriv(const ex & x, unsigned deriv_param) static ex tgamma_series(const ex & arg, - const relational & rel, - int order, - unsigned options) + const relational & rel, + int order, + unsigned options) { // method: // Taylor series where there is no pole falls back to psi function @@ -207,9 +203,9 @@ static ex tgamma_series(const ex & arg, REGISTER_FUNCTION(tgamma, eval_func(tgamma_eval). - evalf_func(tgamma_evalf). - derivative_func(tgamma_deriv). - series_func(tgamma_series)); + evalf_func(tgamma_evalf). + derivative_func(tgamma_deriv). + series_func(tgamma_series)); ////////// @@ -280,10 +276,10 @@ static ex beta_deriv(const ex & x, const ex & y, unsigned deriv_param) static ex beta_series(const ex & arg1, - const ex & arg2, - const relational & rel, - int order, - unsigned options) + const ex & arg2, + const relational & rel, + int order, + unsigned options) { // method: // Taylor series where there is no pole of one of the tgamma functions @@ -295,7 +291,7 @@ static ex beta_series(const ex & arg1, const symbol *s = static_cast(rel.lhs().bp); ex arg1_ser, arg2_ser, arg1arg2_ser; if ((!arg1_pt.info(info_flags::integer) || arg1_pt.info(info_flags::positive)) && - (!arg2_pt.info(info_flags::integer) || arg2_pt.info(info_flags::positive))) + (!arg2_pt.info(info_flags::integer) || arg2_pt.info(info_flags::positive))) throw do_taylor(); // caught by function::series() // trap the case where arg1 is on a pole: if (arg1.info(info_flags::integer) && !arg1.info(info_flags::positive)) @@ -318,9 +314,9 @@ static ex beta_series(const ex & arg1, REGISTER_FUNCTION(beta, eval_func(beta_eval). - evalf_func(beta_evalf). - derivative_func(beta_deriv). - series_func(beta_series)); + evalf_func(beta_evalf). + derivative_func(beta_deriv). + series_func(beta_series)); ////////// @@ -390,9 +386,9 @@ static ex psi1_deriv(const ex & x, unsigned deriv_param) } static ex psi1_series(const ex & arg, - const relational & rel, - int order, - unsigned options) + const relational & rel, + int order, + unsigned options) { // method: // Taylor series where there is no pole falls back to polygamma function @@ -415,11 +411,11 @@ static ex psi1_series(const ex & arg, const unsigned function_index_psi1 = function::register_new(function_options("psi"). - eval_func(psi1_eval). - evalf_func(psi1_evalf). - derivative_func(psi1_deriv). - series_func(psi1_series). - overloaded(2)); + eval_func(psi1_eval). + evalf_func(psi1_evalf). + derivative_func(psi1_deriv). + series_func(psi1_series). + overloaded(2)); ////////// // Psi-functions (aka polygamma-functions) psi(0,x)==psi(x) @@ -513,10 +509,10 @@ static ex psi2_deriv(const ex & n, const ex & x, unsigned deriv_param) } static ex psi2_series(const ex & n, - const ex & arg, - const relational & rel, - int order, - unsigned options) + const ex & arg, + const relational & rel, + int order, + unsigned options) { // method: // Taylor series where there is no pole falls back to polygamma function @@ -541,13 +537,11 @@ static ex psi2_series(const ex & n, const unsigned function_index_psi2 = function::register_new(function_options("psi"). - eval_func(psi2_eval). - evalf_func(psi2_evalf). - derivative_func(psi2_deriv). - series_func(psi2_series). - overloaded(2)); + eval_func(psi2_eval). + evalf_func(psi2_evalf). + derivative_func(psi2_deriv). + series_func(psi2_series). + overloaded(2)); -#ifndef NO_NAMESPACE_GINAC } // namespace GiNaC -#endif // ndef NO_NAMESPACE_GINAC