]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns_gamma.cpp
- prepared for 1.0.13 release
[ginac.git] / ginac / inifcns_gamma.cpp
index 497c37a6adf62beccb007f46406c628337e98d33..3f3bd561bc4a54c85dd1f1a9eb912216eb6ff782 100644 (file)
@@ -4,7 +4,7 @@
  *  some related stuff. */
 
 /*
- *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2003 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
@@ -234,8 +234,8 @@ static ex beta_eval(const ex & x, const ex & y)
                // treat all problematic x and y that may not be passed into tgamma,
                // because they would throw there although beta(x,y) is well-defined
                // using the formula beta(x,y) == (-1)^y * beta(1-x-y, y)
-               const numeric nx = ex_to<numeric>(x);
-               const numeric ny = ex_to<numeric>(y);
+               const numeric &nx = ex_to<numeric>(x);
+               const numeric &ny = ex_to<numeric>(y);
                if (nx.is_real() && nx.is_integer() &&
                        ny.is_real() && ny.is_integer()) {
                        if (nx.is_negative()) {
@@ -291,7 +291,7 @@ static ex beta_series(const ex & arg1,
        // tgamma series directly.
        const ex arg1_pt = arg1.subs(rel);
        const ex arg2_pt = arg2.subs(rel);
-       GINAC_ASSERT(is_exactly_a<symbol>(rel.lhs()));
+       GINAC_ASSERT(is_a<symbol>(rel.lhs()));
        const symbol &s = ex_to<symbol>(rel.lhs());
        ex arg1_ser, arg2_ser, arg1arg2_ser;
        if ((!arg1_pt.info(info_flags::integer) || arg1_pt.info(info_flags::positive)) &&
@@ -345,7 +345,7 @@ static ex psi1_evalf(const ex & x)
 static ex psi1_eval(const ex & x)
 {
        if (x.info(info_flags::numeric)) {
-               const numeric nx = ex_to<numeric>(x);
+               const numeric &nx = ex_to<numeric>(x);
                if (nx.is_integer()) {
                        // integer case 
                        if (nx.is_positive()) {
@@ -453,8 +453,8 @@ static ex psi2_eval(const ex & n, const ex & x)
                return log(tgamma(x));
        if (n.info(info_flags::numeric) && n.info(info_flags::posint) &&
                x.info(info_flags::numeric)) {
-               const numeric nn = ex_to<numeric>(n);
-               const numeric nx = ex_to<numeric>(x);
+               const numeric &nn = ex_to<numeric>(n);
+               const numeric &nx = ex_to<numeric>(x);
                if (nx.is_integer()) {
                        // integer case 
                        if (nx.is_equal(_num1))