Implementation of the Incomplete Beta function



I have checked in a first implementation of the Incomplete Beta function. This
function uses the new package bigfloat for numerical evaluation. I have further
added some tests to the file rtest_gamma.mac.

I think the implementation with the package bigfloat is much more elegant. We
only need to support and to test one routine.

The implementation is not as complete as for other functions, but it might be
good to have an example for the package bigfloat. I will add further
functionality to beta_incomplete.

There are some further problems with the package bigfloat. One point is the
handling of Maxima rationals. Another point the imaginary symbol. Here are some
examples:

(%i3) beta_incomplete(0.5,2.8,0.73);
(%o3) 1.097127003359422

A Maxima rational as the first argument:

(%i4) beta_incomplete(1/2,2.8,0.73);
Maxima encountered a Lisp error:

Error in MACSYMA-TOP-LEVEL [or a callee]: No matching method for the
generic-function #<compiled-closure BIGFLOAT::TWO-ARG-*>,
when called with arguments (NIL 1.6764907877644366).

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.

As the last argument a Maxima rational works:

(%i5) beta_incomplete(0.5,2.8,3/2);
(%o5) 1.142891048340748-0.025822579159378*%i

The symbol %i as argument:

(%i10) beta_incomplete(0.5,%i,1.5);
BIGFLOAT:  Unable to convert %i to a CL or BIGFLOAT number
 -- an error.  To debug this try debugmode(true);

Remark: It is necessary to support rationals also in expressions like
1/2+0.5*%i.

I would be posssible to do some workarounds in the code of beta_incomplete. But
I think it is better to have the package bigfloat as complete as possible.


A next task is to improve the Beta function. The handling of negative integers
is inconsistent. Support for complex and bigfloat numbers has to be added. 

Dieter Kaiser