-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meijer G function #265
Comments
I doubt it — it seems like one of those incredibly general functions (look at how many input parameters it has!) that is virtually impossible to implement well. Is there any efficient implementation of this function (i.e. not just summing a slowly converging series or doing a brute-force numerical integration) in any language or any publication anywhere? |
Hi! Thank you for your response. That is true, there is a lot of input parameters. To be honest I don't know how internally it operates, but this function is implemented in Mathematica and matlab and it seems to work well. |
Symbolic-algebra packages like Mathematica use slow brute-force methods to compute special functions. It looks like Matlab may use its symbolic-algebra backend for this, so it is probably similar. (A simple test: in Matlab, try computing this function on |
Here is a test on Matlab R2020b:
i.e. it is 500–1000× slower than other special functions, which is indicative of a slow brute-force calculation (e.g. by numerical integration). And if you add more parameters, it slows down even more — e.g. Nearly the whole point of using a special function is to avoid slow brute-force numerical integration, so if that's the only way to compute it then I don't think it's appropriate for this package. |
Dear Steven, |
The Matlab special functions are mostly not implemented in Matlab, but rather are calling C and Fortran libraries, so their performance is usually reasonably good on a vector of inputs. |
Thanks a lot! |
@stevengj I'm very interested in using these and I can work with you to add them. I have a use-case for them in SymbolicRegression.jl. Because Meijer G-functions let you represent a very general class of special functions, they are a useful basis for evolving new operators. I think that in Julia we could exploit multiple dispatch, specializing on the parameters (which are only integers - i.e., via Also, here's a note I found on the Mathematica implementation from stackexchange:
So perhaps there are faster ways to compute them? What do you think? |
Hi there, it would be possible to add the meijer-G function to the Special Functions package?
Thanks a lot!
Crist.
The text was updated successfully, but these errors were encountered: