### Calculating the simple continued fraction of log_{b}a

This performs an algorithm from T.H. Jackson and K.R. Matthews, *On Shanks' algorithm for computing the continued fraction of log*_{b}a, Journal of Integer Sequences **5** (2002) article 02.2.7.

We run the algorithm for c = b^{r}, r = m,...,n (suggested by Alan Offer).

Here a, b, m, n are positive integers satisfying a > b > 1, and 1 ≤ m ≤ n.

We find that if we add the restriction A_{i,c} > c + √c and A'_{i,c} > c + √c, we get better results, though this restriction does not seem to be needed when a = b+1.
With c = b^{r}, we have found that apart from some initial exceptional values of r, the correct partial quotients will be returned. In fact, if a=b+1, it seems that the correct partial quotients are always returned.

This is a BCMath version of the BC program log

*Last modified 8th may 2018*

Return to main page