Gauss hypergeometric 2F1 function for complex argument.

3 views (last 30 days)
I have wound myself up in the situation of having to evaluate the Gauss hypergeometric 2F1 function for complex argument (i believe always with with norm smaller than 1). The other parameters are very nice though and on the form a=1, b=1+k,c=2+k and k some real number. The input in is to be run through a maximiser.
Unfortunately hypergeom of Matlab is very slow, but also seems to give slightly unreliable results (it reduces for k=1/2 where I compared the results).
Do you know of any better implementation? e.g. using .mex (albeit I have never tried it before I will surely give it a show).
Thanks!
  2 Comments
Henrik Dam
Henrik Dam on 10 Jun 2015
Hi. It looks very promising. I get an error when trying to mex the file though. I know next to nothing about this subject. I use mac. Do I need to do something else than download and install the Gfortran from https://gcc.gnu.org/wiki/GFortranBinaries#MacOS, install and write mex genHyper_mex.f90? It produces a lot similar errors, but an example is:
"Warning: Type mismatch in argument 'z' at (1); passed COMPLEX(4) to COMPLEX(8) "FolderPath"/genHyper_mex.f90:740:43: EXPON=EXPON+XL*DBLE(LOG(Z))-DBLE(FACTOR(CMPLX(XL,0.0)))"

Sign in to comment.

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!