Skip to content

Commit cb239a8

Browse files
Better wheel factorization
1 parent 4b0235b commit cb239a8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

FindAFactor/_find_a_factor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,10 +769,10 @@ struct Factorizer {
769769

770770
// Sieving function
771771
BigInteger sievePolynomials(const BigInteger& low, const BigInteger& high) {
772-
const BigInteger maxLcv = toFactorSqrt + high;
773-
for (BigInteger y = toFactorSqrt + 1U + low; isIncomplete && (y < maxLcv); ++y) {
772+
const BigInteger maxLcv = backwardFn(toFactorSqrt + high);
773+
for (BigInteger y = backwardFn(toFactorSqrt + 1U + low); isIncomplete && (y < maxLcv); ++y) {
774774
// Make the candidate NOT a multiple on the wheels.
775-
const BigInteger z = forwardFn(backwardFn(y));
775+
const BigInteger z = forwardFn(y);
776776
// This actually just goes ahead and FORCES
777777
// the number into a "close-by" smooth perfect square.
778778
const BigInteger candidate = makeSmooth(z * z);

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
88

99
[project]
1010
name = "FindAFactor"
11-
version = "5.2.3"
11+
version = "5.2.4"
1212
requires-python = ">=3.8"
1313
description = "Find any nontrivial factor of a number"
1414
readme = {file = "README.txt", content-type = "text/markdown"}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def build_extension(self, ext):
4040

4141
setup(
4242
name='FindAFactor',
43-
version='5.2.3',
43+
version='5.2.4',
4444
author='Dan Strano',
4545
author_email='stranoj@gmail.com',
4646
description='Find any nontrivial factor of a number',

0 commit comments

Comments
 (0)