FindAFactor 3.6.9__cp313-cp313-macosx_15_0_arm64.whl → 3.7.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.
@@ -6,11 +6,11 @@ def find_a_factor(n,
6
6
  use_gaussian_elimination=True if os.environ.get('FINDAFACTOR_USE_GAUSSIAN_ELIMINATION') else False,
7
7
  node_count=int(os.environ.get('FINDAFACTOR_NODE_COUNT')) if os.environ.get('FINDAFACTOR_NODE_COUNT') else 1,
8
8
  node_id=int(os.environ.get('FINDAFACTOR_NODE_ID')) if os.environ.get('FINDAFACTOR_NODE_ID') else 0,
9
- trial_division_level=int(os.environ.get('FINDAFACTOR_TRIAL_DIVISION_LEVEL')) if os.environ.get('FINDAFACTOR_TRIAL_DIVISION_LEVEL') else 2**24,
10
- gear_factorization_level=int(os.environ.get('FINDAFACTOR_GEAR_FACTORIZATION_LEVEL')) if os.environ.get('FINDAFACTOR_GEAR_FACTORIZATION_LEVEL') else 11,
9
+ 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 13,
11
11
  wheel_factorization_level=int(os.environ.get('FINDAFACTOR_WHEEL_FACTORIZATION_LEVEL')) if os.environ.get('FINDAFACTOR_WHEEL_FACTORIZATION_LEVEL') else 7,
12
12
  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 64.0):
13
+ batch_size_multiplier=float(os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER')) if os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER') else 2048.0):
14
14
  return int(_find_a_factor._find_a_factor(str(n),
15
15
  use_congruence_of_squares,
16
16
  use_gaussian_elimination,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: FindAFactor
3
- Version: 3.6.9
3
+ Version: 3.7.0
4
4
  Summary: Find any nontrivial factor of a number
5
5
  Home-page: https://github.com/vm6502q/FindAFactor
6
6
  Author: Dan Strano
@@ -60,11 +60,11 @@ factor = find_a_factor(
60
60
  use_congruence_of_squares=False,
61
61
  use_gaussian_elimination=False,
62
62
  node_count=1, node_id=0,
63
- trial_division_level=16777216,
64
- gear_factorization_level=11,
63
+ trial_division_level=2**20,
64
+ gear_factorization_level=13,
65
65
  wheel_factorization_level=7,
66
66
  smoothness_bound_multiplier=1.0,
67
- batch_size_multiplier=64.0
67
+ batch_size_multiplier=2048.0
68
68
  )
69
69
  ```
70
70
 
@@ -74,11 +74,11 @@ The `find_a_factor()` function should return any nontrivial factor of `to_factor
74
74
  - `use_gaussian_elimination` (default value: `False`): This option is only relevant if `use_congruence_of_squares=True`. In that case, if `use_gaussian_elimination` is `True`, then proper Gaussian elimination is used, with **O(N^3)** worst case complexity but using potentially much smaller "N" count of rows. If the option is `False`, rather than Gaussian elimination, the algorithm checks only for exact factorization parity duplicates in the "smooth" number rows, for **O(N^2)** worst case complexity, but using a potentially much larger "N" count of rows.
75
75
  - `node_count` (default value: `1`): `FindAFactor` can perform factorization in a _distributed_ manner, across nodes, without network communication! When `node_count` is set higher than `1`, the search space for factors is segmented equally per node. If the number to factor is semiprime, and brute-force search is used instead of congruence of squares, for example, all nodes except the one that happens to contain the (unknown) prime factor less than the square root of `to_factor` will ultimately return `1`, while one node will find and return this factor. For best performance, every node involved in factorization should have roughly the same CPU throughput capacity.
76
76
  - `node_id` (default value: `0`): This is the identifier of this node, when performing distributed factorization with `node_count` higher than `1`. `node_id` values start at `0` and go as high as `(node_count - 1)`.
77
- - `trial_division_level` (default value: `16777216`): Trial division is carried out as a preliminary round for all primes up this number. If you need more primes for your smoothness bound, increase this level.
78
- - `gear_factorization_level` (default value: `11`): This is the value up to which "wheel (and gear) factorization" and trial division are used to check factors and optimize "brute force," in general. The default value of `11` includes all prime factors of `11` and below and works well in general, though significantly higher might be preferred in certain cases.
77
+ - `trial_division_level` (default value: `2**20`): Trial division is carried out as a preliminary round for all primes up this number. If you need more primes for your smoothness bound, increase this level.
78
+ - `gear_factorization_level` (default value: `13`): This is the value up to which "wheel (and gear) factorization" and trial division are used to check factors and optimize "brute force," in general. The default value of `13` includes all prime factors of `13` and below and works well in general, though significantly higher might be preferred in certain cases.
79
79
  - `wheel_factorization_level` (default value: `7`): "Wheel" vs. "gear" factorization balances two types of factorization wheel ("wheel" vs. "gear" design) that often work best when the "wheel" is only a few prime number levels lower than gear factorization. Optimized implementation for wheels is only available up to `13`. The primes above "wheel" level, up to "gear" level, are the primes used specifically for "gear" factorization.
80
80
  - `smoothness_bound_multiplier` (default value: `1.0`): starting with the first prime number after wheel factorization, the congruence of squares approach (with Quadratic Sieve) takes a default "smoothness bound" with as many distinct prime numbers as bits in the number to factor (for default argument of `1.0` multiplier). To increase or decrease this number, consider it multiplied by the value of `smoothness_bound_multiplier`.
81
- - `batch_size_multiplier` (default value: `64.0`): Each `1.0` increment of the multiplier is 2 cycles of gear and wheel factorization, alternating every other cycle between bottom of guessing range and top of guessing range, for every thread in use.
81
+ - `batch_size_multiplier` (default value: `2048.0`): Each `1.0` increment of the multiplier is 2 cycles of gear and wheel factorization, alternating every other cycle between bottom of guessing range and top of guessing range, for every thread in use.
82
82
 
83
83
  All variables defaults can also be controlled by environment variables:
84
84
  - `FINDAFACTOR_USE_CONGRUENCE_OF_SQUARES` (any value makes `True`, while default is `False`)
@@ -0,0 +1,8 @@
1
+ _find_a_factor.cpython-313-darwin.so,sha256=RXlZfzOO2qU8Rffn9El5MTP4xZRiDr2JSy-zCdw_K4Y,850488
2
+ FindAFactor/__init__.py,sha256=z12lYiLTSXmc8FpKk4tqkSADlHxEV-NqWyA1d5OuQAQ,40
3
+ FindAFactor/find_a_factor.py,sha256=lIjPkOwcyDtxRj1IZRfsm5nXNEw7dMGJ7MNgykYvSh8,2027
4
+ FindAFactor-3.7.0.dist-info/LICENSE,sha256=kM5ErD_w66mShD_pmEXez6Evb2_MTLRHykc0qdUWEFY,1085
5
+ FindAFactor-3.7.0.dist-info/METADATA,sha256=YojLTXbnB_yantxB4yoCni4pwqo22IdY7V9HXJPbOPg,12598
6
+ FindAFactor-3.7.0.dist-info/WHEEL,sha256=8MDYB8qOpICHXsmvikvrTDt0NBN7mgF9tE1rvEyJ6WE,109
7
+ FindAFactor-3.7.0.dist-info/top_level.txt,sha256=WoOrEcqIwo8A96WXAtimPshsFZfT5d00SvMC6rVKAn0,27
8
+ FindAFactor-3.7.0.dist-info/RECORD,,
Binary file
@@ -1,8 +0,0 @@
1
- _find_a_factor.cpython-313-darwin.so,sha256=vjJ9ZM_wohLUtHgw9UimQcrI_dND4dyidDKLUcV3t_s,850488
2
- FindAFactor/__init__.py,sha256=z12lYiLTSXmc8FpKk4tqkSADlHxEV-NqWyA1d5OuQAQ,40
3
- FindAFactor/find_a_factor.py,sha256=DtZeggHeqvr5C5f1ZvblBLRpEDBvY8SIIQXxd-FiszE,2023
4
- FindAFactor-3.6.9.dist-info/LICENSE,sha256=kM5ErD_w66mShD_pmEXez6Evb2_MTLRHykc0qdUWEFY,1085
5
- FindAFactor-3.6.9.dist-info/METADATA,sha256=Z8ME9evDcVTUwd2PYY6vyJl5VaeZ0aE4lKQV2LferNc,12600
6
- FindAFactor-3.6.9.dist-info/WHEEL,sha256=8MDYB8qOpICHXsmvikvrTDt0NBN7mgF9tE1rvEyJ6WE,109
7
- FindAFactor-3.6.9.dist-info/top_level.txt,sha256=WoOrEcqIwo8A96WXAtimPshsFZfT5d00SvMC6rVKAn0,27
8
- FindAFactor-3.6.9.dist-info/RECORD,,