New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong sign for value of Legendre polynomial at 0 #33962
Labels
Milestone
Comments
Branch: public/33962 |
Commit: |
Reviewer: Travis Scrimshaw |
comment:4
LGTM overall. Just a small change to the doc formatting: - TESTS::
+ TESTS:
- # verify that :trac:`33962` is fixed
+ Verify that :trac:`33962` is fixed::
+
sage: [legendre_P(n, 0) for n in range(-10, 10)]
[0, 35/128, 0, -5/16, 0, 3/8, 0, -1/2, 0, 1,
- 1, 0, -1/2, 0, 3/8, 0, -5/16, 0, 35/128, 0]
+ 1, 0, -1/2, 0, 3/8, 0, -5/16, 0, 35/128, 0] Once changed, you can set a positive review on my behalf. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:6
Thanks for the review and the corrections! I will set to positive review when the patchbot is green again. |
Changed branch from public/33962 to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As discussed in this sage-devel thread,
legendre_P(n, 0)
should be negative whenn
is congruent to 2 modulo 4, but sagemath returns a positive value:The correct values are
[1, -1/2, 3/8, -5/16, 35/128]
. (The signs should alternate when restricted to even values ofn
.)This is a pynac bug. It only arises in the code branch where
n
is an integer variable, so we get the correct values whenn
is real:CC: @egourgoulhon
Component: symbolics
Keywords: orthogonal polynomial, legendre polynomial, pynac
Author: Dave Morris
Branch/Commit:
8131256
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/33962
The text was updated successfully, but these errors were encountered: