In my C++ code, I need to evaluate the confluent hypergeometric function ${}_1F_1(a,b;z)$ with complex arguments in a special case. More precisely, I have to compute $$ e^{-i\phi}{}_1F_1(\ell+1+iZ,2(\ell+1),2i\phi)\, , $$ where $Z,\phi$ are real parameters and $\ell\geq 0$ is an integer. I know that this expression is purely real (but I cannot for the love of god find the reference for this anymore...).
My problem is that the implementations of ${}_1F_1(a,b;z)$ in boost
and gls
only take real arguments.
- Do you have any ideas on how to evaluate the above expression in C++?
- Since we know that the above expression evaluates to real values, is there maybe a trick, that allows using the
boost
orgls
implementations?
I tried using the integral represenation of ${}_1F_1(a,b;z)$ and perform numerical integration, but this only works for small arguments.
Thanks in advance for any help!