Note that logba = 1/logab, it suffices to deal with the case a > b.
We run the algorithm for c = br, r = m,...,n (suggested by Alan Offer).
Here a, b, m, n are positive integers satisfying a > b > 1, and 1 ≤ m ≤ n.
In version 1, we employ the criterion Ai,c > c + b√c in the main loop and usually correct partial quotients are returned.
However the example (a,b,m,n)=(991,2,146,148) shows that there are exceptions.
In version 2, we use the stronger cutoff condition Ai,c > c + b2√c in the main loop, and this anomaly disappears.
However fewer partial quotients will be returned compared with version 1.
Last modified 8th August 2019
Return to main page