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
Extract cyclotomic factors of a polynomial #20263
Comments
comment:1
I have code for this which I'm planning to upload shortly. The algorithm is similar to what PARI is using to test whether a polynomial is equal to a product of cyclotomic polynomials ( |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Commit: |
comment:6
hello,
|
Author: Kiran Kedlaya |
comment:8
Replying to @videlec:
Done.
Technically,
Done.
Yes, raising an error seems like the most useful outcome. |
comment:9
Replying to @kedlaya:
Hi Kiran! It's an argument the method receives, but it's not an argument the user supplies explicitly. I think that's the argument why (some) people prefer to not use
Your observation piqued my interest and a scanned the file. My impression was that "this polynomial" is a tad more common. Some docstrings refer to two polynomials, without being specific about one that is "this". The thing that struck me was that the use of So when we restrict to "user facing" methods, I think the prevailing style quite solidly favours "this polynomial" over "self". |
comment:10
Replying to @nbruin:
There are two different issues. The first is that it is not a "real" input, so it does not belong in an |
comment:11
Concerning, I agree that it is fine english. But then you should not put it inside backquotes which is a Sage convention for Python or Sage objects. In this form it refers to the argument and not to the common english sense. |
comment:12
Could you add a doctest for non exact rings? |
comment:13
Instead of dividing by the leading coefficient you can use the
EDIT: this is not a good idea since this method always converts the polynomial to a rational one... |
comment:14
Replying to @tscrim:
Since I only need to refer to the underlying object once, I think I can and should get away with calling it "this polynomial". If I needed to refer to it more than once, I'd stick with |
comment:15
Replying to @videlec:
There is already a doctest over RR. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:17
Hello, When a reviewer complain he/she puts the ticket in "needs work". When you are done with the modifications you should set it back to "needs review". Otherwise it might be forgotten. |
comment:18
Indeed it was forgotten, by me! I must have thought I had something else to do, but apparently not. Flag set. |
Reviewer: Vincent Delecroix |
Changed branch from u/kedlaya/extract_cyclotomic_factors_of_a_polynomial to |
Add a member function to polynomials that returns the product of all irreducible factors which are cyclotomic polynomials.
Component: algebra
Keywords: cyclotomic polynomials, days71
Author: Kiran Kedlaya
Branch/Commit:
4340103
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/20263
The text was updated successfully, but these errors were encountered: