Skip to content
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

it's possible to change coefficients but not in a way to increase the degree of a polynomial #5830

Open
bennetyee opened this issue Aug 26, 2024 · 1 comment

Comments

@bennetyee
Copy link
Contributor

pub fn set_coefficient(&mut self, i: usize, ai: F) {

not a bug, but an oddity. the API allows callers to change the coefficients of a polynomial, but not to increase its degree. callers can decrease the degree of a polynomial by setting higher degree coefficients to zero.

@peternose
Copy link
Contributor

callers can decrease the degree of a polynomial

True. This was intentional. The reason for this is that we want to have constant time operations on polynomials. Therefore, the function degree and its usage was removed and replaced with size. In general, the crate has no idea what a degree is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants