Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 624097515
  • Loading branch information
pedroysb committed Apr 12, 2024
1 parent b455d4b commit 97982f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paranoid_crypto/lib/special_case_factoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def FactorWithGuess(n: int, p_0: int) -> Optional[list[int]]:
# To avoid this the cube root of n // 2**(3*shift) is computed instead.
bits = n.bit_length()
shift = max(0, (bits // 3) - 52)
bound = int((n >> (3 * shift)) ** (1 / 3)) << shift
bound = int((int(n) >> (3 * shift)) ** (1 / 3)) << shift

for _, u, v in ntheory_util.ContinuedFraction(p_0, q_0):
# An approximation u / v of p_0 / q_0 is good enough for this factoring
Expand Down

0 comments on commit 97982f8

Please sign in to comment.