JuliaMath / JuliaMath/SpecialFunctions.jl
return sequence of bessel functions
- Dominant language
- Julia
- Stars
- 381
- Forks
- 113
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 1
Description
Moved from: https://github.com/JuliaLang/julia/issues/10395
--------------------
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](https://github.com/JuliaLang/julia/commit/a736cb99b12785b91b7cdde49f977acfa2076f7a) suggesting that the [chosen algorithm for integer arguments is different](https://github.com/JuliaLang/openlibm/blob/master/src/e_jn.c).
Nonetheless, for the general case, the [Amos implementation](https://github.com/JuliaLang/openspecfun/blob/master/amos/zbesj.f#L13) 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](https://github.com/JuliaLang/julia/blob/master/base/special/bessel.jl#L19), 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](http://stackoverflow.com/questions/28802777/combining-repmat-and-transpose-in-julia#comment45881632_28802999)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.