From f00e13f1df252d75d16654c04f0ef6d8b9b9dbf9 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Thu, 28 Mar 2002 19:38:32 +0000 Subject: [PATCH] * beta(1,x) evaluates to 1/x. --- ginac/inifcns_gamma.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.47.0