Getting extended precision values of incomplete gamma functions using mpfr::mpreal

60 Views Asked by At

I am trying to obtain the value of an incomplete gamma function with complex arguments, to be precise I am interested in obtaining Gamma[0, a + i*b] for real parameters a,b.

I'm using mpfr in C++ for the remainder of my code, and am facing the problem that throughout my code I am using mpfr::mpreal types so ideally I would like the output of the Gamma function to also be of this type (in this case storing the real part and complex part of the computation in two mpfr::mpreal types).

I included a code snippet below of what I am currently doing. Essentially I am using an arb wrapper taking doubles to compute the complex incomplete Gamma functions: `

complex_double zero;
zero.real = 0;
zero.imag = 0;

complex_double arg1;
arg1.real = a;
arg1.imag = b;

arb_fpwrap_cdouble_gamma_upper(&gamma1, zero, arg1, regularized, flags); //The regularized and       flags parameters are not relevant for the example

// Real part is gamma1.real, and complex part gamma1.imag

` The issue with this approach is that I am using a wrapper for arb which takes doubles and returns doubles so I am losing precision. I was wondering whether there was an approach that maintains precision throughout and stores the real and complex parts of the output in a mpfr::mpreal.

0

There are 0 best solutions below