Processing math: 100%
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 11 years ago

Shashank gravatar image

Bug in Legendre polynomial.

I was trying to evaluate Legendre polynomial Pn(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.

click to hide/show revision 2
No.2 Revision

Bug in Legendre polynomial.

I was trying to evaluate Legendre polynomial Pn(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.