c-f-h / baryrat

A Python package for barycentric rational and polynomial interpolation and approximation.
BSD 2-Clause "Simplified" License
44 stars 7 forks source link

How to approximate a univariate complex function with a complex argument using BRASIL? #6

Open rdguerrerom opened 1 year ago

rdguerrerom commented 1 year ago

Hi,

I have attempted to approximate a univariate complex function with a complex argument using BRASIL. However, it appears that the BRASIL method does not support this type of approximation. Can you provide guidance on the implementation of this functionality? If so, I would be really happy to help and attempt to contribute a little something back to this nice project.

c-f-h commented 1 year ago

Hello,

Are you talking about a complex-valued function defined over a real interval? I believe this should be possible, though I'm not sure if all the details are implemented.

Best approximation over a complex domain, on the other hand, is not possible with BRASIL. Best approximation over complex domains is harder than over intervals.

Maybe you could give your example.

rdguerrerom commented 1 year ago

Hello,

Thanks a lot for answering.

The goal is to speedup the evaluation of the molecular incomplete gamma function with a complex argument.

What do you think?

c-f-h commented 1 year ago

If there is a complex argument, it's not possible to use BRASIL since it only works over intervals.

You could however use the AAA algorithm, which is also contained in the baryrat package.

rdguerrerom commented 1 year ago

@c-f-h, thanks a lot for your swift response.