]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns_gamma.cpp
mentioned ncpow()
[ginac.git] / ginac / inifcns_gamma.cpp
index d180065dbce9e743706097e086278fa9a51e630d..c4f4f1a9aec248c2b1c1aaba4549925188e829de 100644 (file)
@@ -33,9 +33,7 @@
 #include "symbol.h"
 #include "utils.h"
 
-#ifndef NO_NAMESPACE_GINAC
 namespace GiNaC {
-#endif // ndef NO_NAMESPACE_GINAC
 
 //////////
 // Logarithm of Gamma function
@@ -63,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));
                }
@@ -111,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"));
 
 
 //////////
@@ -207,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"));
 
 
 //////////
@@ -318,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}"));
 
 
 //////////
@@ -543,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