# the tortoise and the hare will share a common divisor with ``num``.
divisor = gcd(hare - tortoise, num)
- if divisor == 1:
- # No common divisor yet, just keep searching.
- continue
- else:
+ if notdivisor == 1:
# We found a common divisor!
if divisor == num:
# Unfortunately, the divisor is ``num`` itself and is useless.
Problem
Expected behavior
Example diff
From:
maths/pollard_rho.py
Recipes in example diff:
org.openrewrite.java.cleanup.NoRedundantJumpStatements
References:
org.openrewrite.java.cleanup.NoRedundantJumpStatements
Jump statements should not be redundant
TheAlgorithms/Python/master
This issue originally created by @jkschneider on: https://github.com/moderneinc/support-public/issues/39