FindAFactor 3.8.2__cp313-cp313-macosx_15_0_arm64.whl → 4.0.0__cp313-cp313-macosx_15_0_arm64.whl
Sign up to get free protection for your applications and to get access to all the features.
- FindAFactor/__init__.py +1 -1
- FindAFactor/find_a_factor.py +13 -7
- {FindAFactor-3.8.2.dist-info → FindAFactor-4.0.0.dist-info}/METADATA +1 -1
- FindAFactor-4.0.0.dist-info/RECORD +8 -0
- _find_a_factor.cpython-313-darwin.so +0 -0
- FindAFactor-3.8.2.dist-info/RECORD +0 -8
- {FindAFactor-3.8.2.dist-info → FindAFactor-4.0.0.dist-info}/LICENSE +0 -0
- {FindAFactor-3.8.2.dist-info → FindAFactor-4.0.0.dist-info}/WHEEL +0 -0
- {FindAFactor-3.8.2.dist-info → FindAFactor-4.0.0.dist-info}/top_level.txt +0 -0
FindAFactor/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
from .find_a_factor import find_a_factor
|
1
|
+
from .find_a_factor import find_a_factor, FactoringMethod
|
FindAFactor/find_a_factor.py
CHANGED
@@ -1,19 +1,25 @@
|
|
1
1
|
import os
|
2
2
|
import _find_a_factor
|
3
|
+
from enum import IntEnum
|
4
|
+
|
5
|
+
|
6
|
+
class FactoringMethod(IntEnum):
|
7
|
+
PRIME_SOLVER = 0
|
8
|
+
MIXED = 1
|
9
|
+
FACTOR_FINDER = 2
|
10
|
+
|
3
11
|
|
4
12
|
def find_a_factor(n,
|
5
|
-
|
6
|
-
use_gaussian_elimination=True if os.environ.get('FINDAFACTOR_USE_GAUSSIAN_ELIMINATION') else False,
|
13
|
+
method=FactoringMethod(int(os.environ.get('FINDAFACTOR_METHOD'))) if os.environ.get('FINDAFACTOR_METHOD') else FactoringMethod.PRIME_SOLVER,
|
7
14
|
node_count=int(os.environ.get('FINDAFACTOR_NODE_COUNT')) if os.environ.get('FINDAFACTOR_NODE_COUNT') else 1,
|
8
15
|
node_id=int(os.environ.get('FINDAFACTOR_NODE_ID')) if os.environ.get('FINDAFACTOR_NODE_ID') else 0,
|
9
16
|
trial_division_level=int(os.environ.get('FINDAFACTOR_TRIAL_DIVISION_LEVEL')) if os.environ.get('FINDAFACTOR_TRIAL_DIVISION_LEVEL') else (1<<20),
|
10
|
-
gear_factorization_level=int(os.environ.get('FINDAFACTOR_GEAR_FACTORIZATION_LEVEL')) if os.environ.get('FINDAFACTOR_GEAR_FACTORIZATION_LEVEL') else
|
11
|
-
wheel_factorization_level=int(os.environ.get('FINDAFACTOR_WHEEL_FACTORIZATION_LEVEL')) if os.environ.get('FINDAFACTOR_WHEEL_FACTORIZATION_LEVEL') else
|
17
|
+
gear_factorization_level=int(os.environ.get('FINDAFACTOR_GEAR_FACTORIZATION_LEVEL')) if os.environ.get('FINDAFACTOR_GEAR_FACTORIZATION_LEVEL') else 13,
|
18
|
+
wheel_factorization_level=int(os.environ.get('FINDAFACTOR_WHEEL_FACTORIZATION_LEVEL')) if os.environ.get('FINDAFACTOR_WHEEL_FACTORIZATION_LEVEL') else 11,
|
12
19
|
smoothness_bound_multiplier=float(os.environ.get('FINDAFACTOR_SMOOTHNESS_BOUND_MULTIPLIER')) if os.environ.get('FINDAFACTOR_SMOOTHNESS_BOUND_MULTIPLIER') else 1.0,
|
13
|
-
batch_size_multiplier=float(os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER')) if os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER') else
|
20
|
+
batch_size_multiplier=float(os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER')) if os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER') else 128.0):
|
14
21
|
return int(_find_a_factor._find_a_factor(str(n),
|
15
|
-
|
16
|
-
use_gaussian_elimination,
|
22
|
+
int(method),
|
17
23
|
node_count, node_id,
|
18
24
|
trial_division_level,
|
19
25
|
gear_factorization_level,
|
@@ -0,0 +1,8 @@
|
|
1
|
+
_find_a_factor.cpython-313-darwin.so,sha256=pcnmBZnfoxI6Cbi0cITo46a8mqdqsMufj14RdWWX-fE,274856
|
2
|
+
FindAFactor/__init__.py,sha256=HpY7jfatO8mUdIB7I572t5wwgwfzRQNDRW-egeSIEFo,57
|
3
|
+
FindAFactor/find_a_factor.py,sha256=KHBVInAS_n9hpjRWqWW1vlAbHIfWvDXetG5-CV2m3gA,1986
|
4
|
+
FindAFactor-4.0.0.dist-info/LICENSE,sha256=kM5ErD_w66mShD_pmEXez6Evb2_MTLRHykc0qdUWEFY,1085
|
5
|
+
FindAFactor-4.0.0.dist-info/METADATA,sha256=hLbiwp6vfe340Qr9mkYBnn7jS1U4MZCcgcNeDfFtPd4,1102
|
6
|
+
FindAFactor-4.0.0.dist-info/WHEEL,sha256=8MDYB8qOpICHXsmvikvrTDt0NBN7mgF9tE1rvEyJ6WE,109
|
7
|
+
FindAFactor-4.0.0.dist-info/top_level.txt,sha256=WoOrEcqIwo8A96WXAtimPshsFZfT5d00SvMC6rVKAn0,27
|
8
|
+
FindAFactor-4.0.0.dist-info/RECORD,,
|
Binary file
|
@@ -1,8 +0,0 @@
|
|
1
|
-
_find_a_factor.cpython-313-darwin.so,sha256=XhJGyhAJMlBXLsENVnpjqB0TeGJTQnAq8ubvK6WBRZg,275016
|
2
|
-
FindAFactor/__init__.py,sha256=z12lYiLTSXmc8FpKk4tqkSADlHxEV-NqWyA1d5OuQAQ,40
|
3
|
-
FindAFactor/find_a_factor.py,sha256=5P_1BcoLIFr8JHeLe4smpect7G7TnEDuf4ZPNAqcD3Y,2027
|
4
|
-
FindAFactor-3.8.2.dist-info/LICENSE,sha256=kM5ErD_w66mShD_pmEXez6Evb2_MTLRHykc0qdUWEFY,1085
|
5
|
-
FindAFactor-3.8.2.dist-info/METADATA,sha256=GDQUPaPhY3hJSpf7g7pZdTO3H3DNs-g-nRLh3N-mhtQ,1102
|
6
|
-
FindAFactor-3.8.2.dist-info/WHEEL,sha256=8MDYB8qOpICHXsmvikvrTDt0NBN7mgF9tE1rvEyJ6WE,109
|
7
|
-
FindAFactor-3.8.2.dist-info/top_level.txt,sha256=WoOrEcqIwo8A96WXAtimPshsFZfT5d00SvMC6rVKAn0,27
|
8
|
-
FindAFactor-3.8.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|