Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit cedaf27

Browse files
committed
Remove tails
1 parent 81182b8 commit cedaf27

File tree

7 files changed

+12
-46
lines changed

7 files changed

+12
-46
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ set(CMAKE_CXX_STANDARD 14)
55

66
include_directories(TInteger)
77

8-
add_executable(integer main.cpp multiplication/karatsuba.cpp multiplication/tom_cook.cpp multiplication/modular.cpp multiplication/schonhage_strassen.cpp PseudoFloat/inverse.cpp PseudoFloat/division_cook.cpp prime/fermat.cpp prime/rabin_miller.cpp prime/solovay_strassen.cpp prime/agrawal.cpp TInteger/TInteger.cpp TInteger/TInteger.h multiplication/Multiplication.h prime/Prime.h multiplication/repeated_addition.cpp PseudoFloat/PseudoFloat.h)
8+
add_executable(integer main.cpp multiplication/karatsuba.cpp multiplication/tom_cook.cpp PseudoFloat/inverse.cpp prime/fermat.cpp prime/rabin_miller.cpp prime/solovay_strassen.cpp prime/agrawal.cpp TInteger/TInteger.cpp TInteger/TInteger.h multiplication/Multiplication.h prime/Prime.h multiplication/repeated_addition.cpp PseudoFloat/PseudoFloat.h)
99

1010
set(CMAKE_EXE_LINKER_FLAGS "-static")

PseudoFloat/division_cook.cpp

Lines changed: 0 additions & 2 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,14 @@
99

1010
### Implemented methods:
1111

12-
* [X] Karatsuba multiplication method
13-
* [X] Tom-Cook multiplication method
14-
* [ ] Modular multiplication method
15-
* [ ] Schönhage-Strassen multiplication method
16-
* [X] The Best Multiplication Method Ever 🤩 (WOW)
17-
* [X] Newton's inverse method
18-
* [ ] Cook division method?
19-
* [X] Fermat primality check method
20-
* [X] Rabin-Miller primality check method
21-
* [X] Solovay-Strassen primality check method
22-
* [X] Agrawal-Kayal-Saxena primality check method
12+
* Karatsuba multiplication method
13+
* Tom-Cook multiplication method
14+
* The Best Multiplication Method Ever 🤩 (WOW)
15+
* Newton's inverse method
16+
* Fermat primality check method
17+
* Rabin-Miller primality check method
18+
* Solovay-Strassen primality check method
19+
* Agrawal-Kayal-Saxena primality check method
2320

2421
## Building
2522

multiplication/Multiplication.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@ class TomCook: public Multiplication {
2121
TInteger multiply(const TInteger &a, const TInteger &b) const override;
2222
};
2323

24-
class Modular: public Multiplication {
25-
public:
26-
TInteger multiply(const TInteger &a, const TInteger &b) const override;
27-
};
28-
29-
class SchonhageStrassen: public Multiplication {
30-
public:
31-
TInteger multiply(const TInteger &a, const TInteger &b) const override;
32-
};
33-
3424
class RepeatedAddition: public Multiplication {
3525
public:
3626
TInteger multiply(const TInteger &a, const TInteger &b) const override;

multiplication/modular.cpp

Lines changed: 0 additions & 8 deletions
This file was deleted.

multiplication/schonhage_strassen.cpp

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,15 @@
1010
"Output": 0,
1111
"Karatsuba": 1,
1212
"Tom-Cook": 2,
13-
"Modular": 3,
14-
"Schonhage-Strassen": 4,
1513
"Newton": 5,
16-
"Division": 6,
1714
"Fermat": 7,
1815
"Rabin-Miller": 8,
1916
"Solovay-Strassen": 9,
2017
"Agrawal": 10,
2118
"Sum": 11,
2219
"Subtract": 12,
2320
"Product": 13,
24-
"Division/": 14,
21+
"Division": 14,
2522
"Remainder": 15,
2623
"Repeated addition": 16
2724
}
@@ -154,9 +151,8 @@ def __init__(self, integer1: int):
154151
integer1 += 2
155152
Test.__init__(self, method=self.method_number, integer1=integer1)
156153

157-
158154
def self_execute(self):
159-
if isprime(self.integer1) == True:
155+
if isprime(self.integer1) is True:
160156
self.my_result = "IS_PRIME"
161157
else:
162158
self.my_result = "NOT_PRIME"
@@ -210,7 +206,7 @@ def custom_div(obj: any, a: int, b: int):
210206
class DivisionTest(ArithmeticTest):
211207
name = "Division test"
212208
operation = custom_div
213-
method_number = METHOD_NUMBER["Division/"]
209+
method_number = METHOD_NUMBER["Division"]
214210

215211

216212
class LargeDivisionTest(DivisionTest):

0 commit comments

Comments
 (0)