From: Richard Kreckel Date: Thu, 28 Mar 2002 19:38:32 +0000 (+0000) Subject: * beta(1,x) evaluates to 1/x. X-Git-Tag: release_1-1-0~107 X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=commitdiff_plain;h=f00e13f1df252d75d16654c04f0ef6d8b9b9dbf9;p=ginac.git * beta(1,x) evaluates to 1/x. --- diff --git a/ginac/inifcns_gamma.cpp b/ginac/inifcns_gamma.cpp index 15b1a9a5..72eeec08 100644 --- a/ginac/inifcns_gamma.cpp +++ b/ginac/inifcns_gamma.cpp @@ -230,6 +230,10 @@ static ex beta_evalf(const ex & x, const ex & y) static ex beta_eval(const ex & x, const ex & y) { + if (x.is_equal(_ex1)) + return 1/y; + if (y.is_equal(_ex1)) + return 1/x; if (x.info(info_flags::numeric) && y.info(info_flags::numeric)) { // 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