Thanks for reporting the bug. I opened trac ticket #33962 
<https://trac.sagemath.org/ticket/33962> to fix it.

On Monday, June 6, 2022 at 4:21:01 PM UTC-6 vdelecroix wrote:

> There is indeed a problem
>
> sage: legendre_P(2, 0)
> 1/2
> sage: legendre_P(2.0, 0.0)
> -0.500000000000000
>
> On Mon, 6 Jun 2022 at 20:38, Dan Cross <daniel...@gmail.com> wrote:
> >
> > Hi,
> > It seems the special values of the Legendre Polynomials evaluated at 
> zero are hard coded to be positive, but the sign should alternate. So, 
> while legendre_P(0,0) correctly gives 1 and legendre_P(4,0) correctly gives 
> 3/8, legendre_P(2,0) gives +1/2 instead of -1/2. Evaluating legendre_P(2,x) 
> for any x close to zero gives a value close to -1/2 as it should. This 
> problem is even evident on the documentation page (
> https://paulmasson.github.io/sagemath-docs/functions/legendre_P.html) 
> which shows the graph of P_2 passing through -1/2 but tabulates the special 
> value at zero as +1/2.
> >
> > Thanks.
> >
> > --
> > You received this message because you are subscribed to the Google 
> Groups "sage-devel" group.
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sage-devel+...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/9745505a-d332-4b63-9acd-770123e0291dn%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/f8829538-14ba-45d5-9675-f2fb1c4cc3acn%40googlegroups.com.

Reply via email to