]> www.ginac.de Git - ginac.git/commitdiff
* beta(1,x) evaluates to 1/x.
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Thu, 28 Mar 2002 19:38:32 +0000 (19:38 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Thu, 28 Mar 2002 19:38:32 +0000 (19:38 +0000)
ginac/inifcns_gamma.cpp

index 15b1a9a5e851ea19dc68992a576de7eee5c0febe..72eeec086f722bf19cbfca1b5ef8dce9dd7062c4 100644 (file)
@@ -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