You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nonetheless, for the general case, the Amos implementation returns a sequence of bessel functions, nu+I-1, I=1,...,N, and it would be very nice if the julia wrapper could return the whole sequence. Currently, I believe julia implements vectorisation over nu as a for loop and just takes the one value from the Amos sequence (or openlibm's).
Since it is not uncommon to need a sequence of values (Bessel functions tend to be used in recurrence relations), it is a bit wasteful to iterate over nu when it was already done at the Fortran level.
- you should however be able to do a slightly different ccall yourself if you would like a larger N.
You may also find it neat/useful that Amos was translated to Julia here: https://github.com/nolta/SpecialFunctions.jl
We should probably replace the Fortran part of openspecfun with that at some point (#8536), just haven't yet done the work of turning that into a full-fledged tested and registered Julia package.
I'm very new to julia, so not sure I managed to find the actual source code being used for those bessel(jhy) functions. There's a related thread suggesting that the chosen algorithm for integer arguments is different.
Nonetheless, for the general case, the Amos implementation returns a sequence of bessel functions, nu+I-1, I=1,...,N, and it would be very nice if the julia wrapper could return the whole sequence. Currently, I believe julia implements vectorisation over nu as a for loop and just takes the one value from the Amos sequence (or openlibm's).
Since it is not uncommon to need a sequence of values (Bessel functions tend to be used in recurrence relations), it is a bit wasteful to iterate over nu when it was already done at the Fortran level.
Related question on StackOverflow
The text was updated successfully, but these errors were encountered: