User blog comment:QuasarBooster/Did I translate this mathematica code right?/@comment-30004975-20190910184540

The while line should be while (y:=y-1/denominator(y) or 1) and 2*y>v: Other than that it seems correct