start restructuring project
This commit is contained in:
5
HaskellMath.hs
Normal file
5
HaskellMath.hs
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
import Primes.SoloveyStrassen (soloveyStrassen)
|
||||
import Primes.MillerRabin (millerRabin)
|
||||
import Primes.FermatPrimeTest (fermatPrimeTest)
|
||||
31
README.md
31
README.md
@@ -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
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
module Primes.FermatPrimeTest (fermatPrimeTest) where
|
||||
|
||||
import System.Random (randomRIO)
|
||||
import ModularArithmeticUtils (modExp)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
module Primes.MillerRabin (millerRabin) where
|
||||
|
||||
import System.Random (randomRIO)
|
||||
import ModularArithmeticUtils (modExp, factorOutTwos)
|
||||
|
||||
@@ -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
0
test/test.hs
Normal file
Reference in New Issue
Block a user