Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Bug in Legendre polynomial.

I was trying to evaluate Legendre polynomial $P_{n}(x)$ for a very high n, and it seems for n greater than 50 or so sage gives wrong answer. For eg.

P.<t> = QQ[]
legendre_P(90,t)(0.9)

gives 1.56319477427853e13 whereas wolfram alpha gives -0.08749. Is there an alternate way to calculate Legendre polynomials in sage, which would give the right answer.

Bug in Legendre polynomial.

I was trying to evaluate Legendre polynomial $P_{n}(x)$ for a very high large n, and it seems for n greater than 50 or so sage gives wrong answer. For eg.

P.<t> = QQ[]
legendre_P(90,t)(0.9)

gives 1.56319477427853e13 whereas wolfram alpha gives -0.08749. Is there an alternate way to calculate Legendre polynomials in sage, which would give the right answer.