]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns_gamma.cpp
- dummy index renamer didn't account for internal dummy indices of objects
[ginac.git] / ginac / inifcns_gamma.cpp
index 3ba8bb462dbf8909c477e773fd4cbf7b469dd7ac..c4f4f1a9aec248c2b1c1aaba4549925188e829de 100644 (file)
@@ -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 <stdexcept>
 
 #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
@@ -64,7 +61,7 @@ static ex lgamma_eval(const ex & x)
                if (x.info(info_flags::integer)) {
                        // lgamma(n) -> log((n-1)!) for postitive n
                        if (x.info(info_flags::posint))
-                               return log(factorial(x.exadd(_ex_1())));
+                               return log(factorial(x + _ex_1()));
                        else
                                throw (pole_error("lgamma_eval(): logarithmic pole",0));
                }
@@ -112,7 +109,8 @@ static ex lgamma_series(const ex & arg,
 REGISTER_FUNCTION(lgamma, eval_func(lgamma_eval).
                           evalf_func(lgamma_evalf).
                           derivative_func(lgamma_deriv).
-                          series_func(lgamma_series));
+                          series_func(lgamma_series).
+                          latex_name("\\log \\Gamma"));
 
 
 //////////
@@ -208,7 +206,8 @@ 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));
+                          series_func(tgamma_series).
+                          latex_name("\\Gamma"));
 
 
 //////////
@@ -319,7 +318,8 @@ 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));
+                        series_func(beta_series).
+                        latex_name("\\mbox{B}"));
 
 
 //////////
@@ -544,9 +544,8 @@ const unsigned function_index_psi2 =
                               evalf_func(psi2_evalf).
                               derivative_func(psi2_deriv).
                               series_func(psi2_series).
+                           latex_name("\\psi").
                               overloaded(2));
 
 
-#ifndef NO_NAMESPACE_GINAC
 } // namespace GiNaC
-#endif // ndef NO_NAMESPACE_GINAC