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

Add is_prime(char) check to GF(char, k) #1598

Merged
merged 3 commits into from
Dec 18, 2023

Conversation

lgoettgens
Copy link
Collaborator

Resolves #1493 by adding an analogous check as for the modulus of a polynomial in ZZ/nZZ in that constructor.

cc @mjrodgers

@lgoettgens lgoettgens requested a review from thofma December 15, 2023 15:38
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (209d6b4) 84.14% compared to head (f0eec2d) 84.15%.

Files Patch % Lines
src/flint/FlintTypes.jl 66.66% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1598   +/-   ##
=======================================
  Coverage   84.14%   84.15%           
=======================================
  Files          94       94           
  Lines       36854    36857    +3     
=======================================
+ Hits        31011    31017    +6     
+ Misses       5843     5840    -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@thofma thofma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make it a ArgumentError? That would be consistent with what @req does.

test/flint/fq-test.jl Outdated Show resolved Hide resolved
test/flint/fq_nmod-test.jl Outdated Show resolved Hide resolved
@lgoettgens
Copy link
Collaborator Author

Maybe make it a ArgumentError? That would be consistent with what @req does.

A DomainError is consistent with the other constructors. Furthermore, Nemo uses DomainErrors a lot, so I would rather change that in a future PR (maybe once @req is moved to AA).

@lgoettgens lgoettgens requested a review from thofma December 18, 2023 11:25
@thofma thofma merged commit 7761cc1 into Nemocas:master Dec 18, 2023
14 of 15 checks passed
@lgoettgens lgoettgens deleted the lg/GF-isprime branch December 21, 2023 17:36
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

Successfully merging this pull request may close these issues.

GF(p,n) does not check if p is prime
2 participants