[Numpy-discussion] Suggestions for GSoC Projects

Jennifer stone jenny.stone125 at gmail.com
Sun Feb 23 08:18:11 EST 2014

In an attempt to analyze the accuracy of hyp2f1,
Different cases mentioned in Abramowitz (
and also in the Thesis on 'Computation of Hypergeometric functions"
pg 65-66)
were tried out, and the function fails without warning when:
    c<0, c is not integral
   |c|>>|a| and |b|

For example:
while the answer is

this case appears to filter down to hys2f1 in the source code

I tried the same input in mpmath to check if it works there:
which is the solution when we apply power series expansion.

however MATLAB succeeds in giving the required solution.
Another interesting fact is that of the methods mentioned in the thesis:
Taylor series expansion, fraction method with double precision,
Gauss-Jacobi method and RK4), none succeeds in the given case.

I don't have any idea how the function itself is evaluated in the given
Any leads on how it is done and how MATLAB executes it?

On Thu, Feb 20, 2014 at 1:16 AM, Jennifer stone <jenny.stone125 at gmail.com>wrote:

> If you are interested in the hypergeometric numerical evaluation, it's
>> probably a good idea to take a look at this recent master's thesis
>> written on the problem:
>> http://people.maths.ox.ac.uk/porterm/research/pearson_final.pdf<http://bl-1.com/click/load/BDEKOABvUWAAYgNhATc-b0231>
>> The thesis is really comprehensive and detailed with quite convincing
> conclusions on the methods to be used with varying a,b,x (though I am
> yet to read the thesis properly enough understand and validate each
> of the multitude of the cases for the boundaries for the parameters).
> It seems to be an assuring and reliable walk through for the project.
>> This may give some systematic overview on the range of methods
>> available. (Note that for copyright reasons, it's not a good idea to
>> look closely at the source codes linked from that thesis, as they are
>> not available under a compatible license.)
>> It may well be that the best approach for evaluating these functions,
>> if accuracy in the whole parameter range is wanted, in the end turns
>> out to require arbitrary-precision computations.  In that case, it
>> would be a very good idea to look at how the problem is approached in
>> mpmath. There are existing multiprecision packages written in C, and
>> using one of them in scipy.special could bring better evaluation
>> performance even if the algorithm is the same.
> Yeah, this seems to be brilliant idea. mpmath too, I assume, must have
> used some of the methods mentioned in the thesis. I ll look through the
> code and get back.
> I am still unaware of the complexity of project expected at GSoC. This
> project
> looks engaging to me. Will an attempt to improve both Spherical harmonic
> functions ( improving the present algorithm to avoid the calculation for
> lower n's and m's) and hypergeometric functions be too ambitious or
> is it doable?
> Regards
> Jennifer
>>  --
>> Pauli Virtanen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140223/94e240dc/attachment.html>

More information about the NumPy-Discussion mailing list