start restructuring project

This commit is contained in:
2026-01-10 13:23:43 +01:00
parent 5dfcc79927
commit 1bd58d27d7
11 changed files with 25 additions and 17 deletions

5
HaskellMath.hs Normal file
View File

@@ -0,0 +1,5 @@
import Primes.SoloveyStrassen (soloveyStrassen)
import Primes.MillerRabin (millerRabin)
import Primes.FermatPrimeTest (fermatPrimeTest)

View File

@@ -1,25 +1,24 @@
# haskell-math
## Modular square roots algorithms
## running project from CLI
```
$ ghci -i./src
ghci> :load HaskellMath.hs
```
### Tonelli Shanks
file: `TonelliShanks.hs`
## algorithms
## primality test algorithms
### Modular square roots algorithms
### Fermat's prime test
file: `fermat-prime-test.hs`
+ Tonelli Shanks
### Miller Rabin's prime test
file: `miller-rabin-prime-test.hs`
### primality test algorithms
### Solovey Strassen's prime test
file: `SoloveyStrassen.hs`
+ Fermat's prime test
+ Miller Rabin's prime test
+ Solovey Strassen's prime test
## factorization algorithms
### factorization algorithms
### Fermat's factorization
file: `fermat-factorization.hs`
### Pollard's p-1
file: `PollardPminus1.hs`
+ Fermat's factorization
+ Pollard's p-1

View File

@@ -1,3 +1,5 @@
module Primes.FermatPrimeTest (fermatPrimeTest) where
import System.Random (randomRIO)
import ModularArithmeticUtils (modExp)

View File

@@ -1,3 +1,5 @@
module Primes.MillerRabin (millerRabin) where
import System.Random (randomRIO)
import ModularArithmeticUtils (modExp, factorOutTwos)

View File

@@ -1,4 +1,4 @@
module SoloveyStrassen (soloveyStrassen) where
module Primes.SoloveyStrassen (soloveyStrassen) where
import ModularArithmeticUtils (modExp, jacobi)
import System.Random (randomRIO)

0
test/test.hs Normal file
View File