Skip to content

Implement algorithm=pari for .lagrange_polynomial() #39833

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

Closed
1 task done
user202729 opened this issue Mar 31, 2025 · 0 comments · Fixed by #39851
Closed
1 task done

Implement algorithm=pari for .lagrange_polynomial() #39833

user202729 opened this issue Mar 31, 2025 · 0 comments · Fixed by #39851

Comments

@user202729
Copy link
Contributor

Problem Description

Currently the following 3 provides identical result (up to roundoff error)

C = CC
x = [C.random_element() for i in range(10)]
y = [C.random_element() for i in range(10)]

C["x"].lagrange_polynomial(list(zip(x, y)), algorithm="divided_difference")
C["x"].lagrange_polynomial(list(zip(x, y)), algorithm="neville")[-1]
C["x"](pari.polinterpolate(pari(x), pari(y)))

but the pari is the fastest.

Proposed Solution

Implement algorithm="pari"

Alternatives Considered

Additional Information

No response

Is there an existing issue for this?

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
vbraun pushed a commit to vbraun/sage that referenced this issue Apr 4, 2025
Fixes sagemath#39833

### 📝 Checklist

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.

URL: sagemath#39851
Reported by: Frédéric Chapoton
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this issue Apr 5, 2025
sagemathgh-39851: add pari algo for polynomial interpolation
    
Fixes sagemath#39833

### 📝 Checklist

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#39851
Reported by: Frédéric Chapoton
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this issue Apr 7, 2025
sagemathgh-39851: add pari algo for polynomial interpolation
    
Fixes sagemath#39833

### 📝 Checklist

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#39851
Reported by: Frédéric Chapoton
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this issue Apr 10, 2025
sagemathgh-39851: add pari algo for polynomial interpolation
    
Fixes sagemath#39833

### 📝 Checklist

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#39851
Reported by: Frédéric Chapoton
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this issue Apr 13, 2025
sagemathgh-39851: add pari algo for polynomial interpolation
    
Fixes sagemath#39833

### 📝 Checklist

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#39851
Reported by: Frédéric Chapoton
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this issue Apr 18, 2025
sagemathgh-39851: add pari algo for polynomial interpolation
    
Fixes sagemath#39833

### 📝 Checklist

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#39851
Reported by: Frédéric Chapoton
Reviewer(s):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant