Handling branch cuts for hypergeometric functions



I'm starting to look at the branch cuts for some of the hypergeometric
functions.   In particular, some of hypergeometric functions are
expressed in terms of associated Legendre functions.  But, as the many
formulas in A&S 15.4.10-15.4.26, the expression depends on the value
of the argument.

I think some of the bugs in the testsuite can be attributed to this.

How can this be handled in maxima?  For example 15.4.12 is valid for
|arg(-z)| < pi and z not between 0 and 1.  But 15.4.13 is valid for 0
< x < 1.

Would it make sense to just ask the user if 0 < x < 1 and use
15.4.13, otherwise use 15.4.12?  This kind of implies to the user that
x is a real number.

What to do?

Ray