Where can I find the most widely adopted implementation of Legendre polynomials?


#1

Apart from an implementation hidden somewhere in Jacobi, I could not find where this special, but quite common, function was implemented. Am I missing the obvious location? Maybe it belongs in SpecialFunctions?


#2

do either of these help?

https://github.com/milthorpe/SphericalHarmonics.jl


#3

I wouldn’t call the function legendre listed in the README of https://github.com/pjabardo/Jacobi.jl “hidden away”.


#4

just re-found that – nice package … I added it above


#5

It requires unnecessary allocations, but you can also use ApproxFun:

f = Fun(Legendre(), [zeros(k-1);1])
f(0.1)

#6

Thanks everyone for the overview. SphericalHarmonics comes closest to where I expected legendre to reside. In striving for a minimal amount of dependencies I would be a bit adverse to pulling in large complex packages like GSL and Jacobi if I only wanted a single function from them.