forked from Bodigrim/arithmoi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bodigrim#118] Add
findPrime
function
In addition, the `isPrime` function has been fixed as it contained two errors. - Firstly, it checked if the norm of an Eisenstein integer was congruent to 0 modulo 3, which is not necessary because it is supposed to be a prime integer. - Secondly, it did not account for the possibility of an Eisenstein integer being the product of an integer prime and an Eisenstein unit. For example, `isPrime 11` would be `True`, but `isPrime $ 11 * (1 + ω)` would be `False`, which is incorrect.
- Loading branch information
Showing
2 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters